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

core/cliwrap: Fix is_ostree_layout() in unit tests #5241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgwalters
Copy link
Member

The is_ostree_layout() function parsed the real root filesystem. But we started using it in unit tests which creates unpredictable behavior.

The unit test for the core script wrapping was failing for me, and digging in I don't see how it could have ever passed. I don't think we're actually running the Rust tests in CI...need to dig into that.

  • Change is_ostree_layout to take a cap-std root
  • Add a unit test for it alone
  • Change all users to pass the rootfs
  • Fix the undo() method to undo the kernel-install wrapping correctly

With this the unit test passes again, and we shouldn't have any behavior which depends on the development root.

The `is_ostree_layout()` function parsed the real root filesystem.
But we started using it in *unit tests* which creates unpredictable
behavior.

The unit test for the core script wrapping was failing for me,
and digging in I don't see how it could have ever passed. I don't
think we're actually running the Rust tests in CI...need to dig
into that.

- Change `is_ostree_layout` to take a cap-std root
- Add a unit test for it alone
- Change all users to pass the rootfs
- Fix the `undo()` method to undo the kernel-install wrapping
  correctly

With this the unit test passes again, and we shouldn't
have any behavior which depends on the development root.

Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters requested a review from jmarrero January 22, 2025 21:37
@cgwalters
Copy link
Member Author

/retest

@cgwalters
Copy link
Member Author

Quay flakes...

Copy link

openshift-ci bot commented Jan 22, 2025

@cgwalters: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images b83412a link true /test images

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

1 participant