Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Ensure backup/restore preserves file attributes #126

Merged

Conversation

richm
Copy link
Contributor

@richm richm commented Nov 14, 2023

I noticed some test failures in tests that check ownership/permissions
of config files. The tests were recently changed to reuse the same
VM, so I suspect config files were not being backed up/restored with
the correct file attributes. Use cp -a to preserve all file
attributes.

Signed-off-by: Rich Megginson [email protected]

@richm richm requested a review from Jakuje as a code owner November 14, 2023 22:00
@richm
Copy link
Contributor Author

richm commented Nov 14, 2023

[citest]

I noticed some test failures in tests that check ownership/permissions
of config files.  The tests were recently changed to reuse the same
VM, so I suspect config files were not being backed up/restored with
the correct file attributes.  Use `cp -a` to preserve all file
attributes.

Signed-off-by: Rich Megginson <[email protected]>
@richm richm force-pushed the backup-restore-preserve-file-attrs branch from ba44dc8 to eb621da Compare November 14, 2023 22:41
@richm richm merged commit 39382b4 into linux-system-roles:main Nov 14, 2023
@richm richm deleted the backup-restore-preserve-file-attrs branch November 14, 2023 22:42
@Jakuje
Copy link
Collaborator

Jakuje commented Nov 15, 2023

I think I have the same backup/restore code in the ansible-sshd role. Do you want a submit a PR for that one too?
https://github.com/willshersystems/ansible-sshd/blob/350a0e562b351575ef1c14ee8e13e2d34baa8927/tests/tasks/backup.yml#L21

@richm
Copy link
Contributor Author

richm commented Nov 15, 2023

I think I have the same backup/restore code in the ansible-sshd role. Do you want a submit a PR for that one too? https://github.com/willshersystems/ansible-sshd/blob/350a0e562b351575ef1c14ee8e13e2d34baa8927/tests/tasks/backup.yml#L21

Yes. I guess it hasn't been a problem because we aren't using baseos ci for ansible-sshd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants