-
Notifications
You must be signed in to change notification settings - Fork 346
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
test: hooks integration test #959
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tony84727 Thanks for your PR. Great! I left a comment, please check.
.hooks( | ||
HooksBuilder::default() | ||
.prestart(vec![ | ||
write_log_hook("pre-start1 called"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to call twice per-hook?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ported from here:
https://github.com/opencontainers/runtime-tools/blob/0105384f68e16803891d0a17d9067b1def6a2778/validation/hooks/hooks.go#L32-L67
I was having the same question. I guess calling twice is to ensure the implementation actually executes hooks in the given order. (hook 1 then hook 2 in sequence)
Codecov Report
@@ Coverage Diff @@
## main #959 +/- ##
==========================================
+ Coverage 69.12% 69.23% +0.11%
==========================================
Files 118 118
Lines 12460 12440 -20
==========================================
Hits 8613 8613
+ Misses 3847 3827 -20 |
Test failed. I will look into this. Maybe it's a race condition of hooks writing logs? |
@tony84727 This indicates that the runc did not pass the test, not youki. We run integration tests on runc to verify the integration tests themselves.
|
0f1b4ab
to
449d720
Compare
👌 I've made |
tests/rust-integration-tests/integration_test/src/tests/hooks/hooks_test.rs
Outdated
Show resolved
Hide resolved
See youki-dev#361 Signed-off-by: Tony Duan <tony84727@gmail.com>
859c217
to
e3aa2c0
Compare
Add
hooks
integration testSee #361
Signed-off-by: Tony Duan tony84727@gmail.com