Skip to content

Commit

Permalink
feat: save/restore also insights-client-payload.log for insights-client
Browse files Browse the repository at this point in the history
insights-client-payload.log is used instead of insights-client.log in
case the --payload option used. Hence, do the backup also of that log
file, restoring it when done, and archiving it if created during a test.

Also handle the .1/.2/.3 versions, to handle the old client/core
versions that did their own log rotation.

Signed-off-by: Pino Toscano <[email protected]>
ptoscano committed Jun 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2d704a8 commit e531a45
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pytest_client_tools/insights_client.py
Original file line number Diff line number Diff line change
@@ -28,6 +28,22 @@
pathlib.Path("/var/log/insights-client/insights-client.log.3"),
remove_at_start=True,
),
SavedFile(
pathlib.Path("/var/log/insights-client/insights-client-payload.log"),
remove_at_start=True,
),
SavedFile(
pathlib.Path("/var/log/insights-client/insights-client-payload.log.1"),
remove_at_start=True,
),
SavedFile(
pathlib.Path("/var/log/insights-client/insights-client-payload.log.2"),
remove_at_start=True,
),
SavedFile(
pathlib.Path("/var/log/insights-client/insights-client-payload.log.3"),
remove_at_start=True,
),
)


0 comments on commit e531a45

Please sign in to comment.