pkg/sysinfo: cleanup tests#49189
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jan 2, 2025
Merged
Conversation
thaJeztah
commented
Jan 1, 2025
| // Check if AppArmor is supported. then it must be TRUE , else FALSE | ||
| if _, err := os.Stat("/sys/kernel/security/apparmor"); err != nil { | ||
| t.Skip("AppArmor Must be Enabled") | ||
| if expected := seccomp.IsEnabled(); sysInfo.Seccomp != expected { |
Member
Author
There was a problem hiding this comment.
Starting to consider if we should create a local copy of this instead of depending on containerd's seccomp package, because it's really minimal. We could even consider moving it into our profiles/seccomp package, but perhaps that's not needed if we only use it here.
(this is the only package where we import containerd's pkg/seccomp)
robmry
approved these changes
Jan 2, 2025
- use t.TempDir() - combine various tests to check if New() sets expected values instead of skipping tests when not. - remove gotest.tools, as it was only used minimally - replace uses of "path" for filepath operations. Signed-off-by: Sebastiaan van Stijn <[email protected]>
46173b9 to
547151a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- A picture of a cute animal (not mandatory but encouraged)