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

add kill test #2996

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

add kill test #2996

wants to merge 3 commits into from

Conversation

YamasouA
Copy link

@YamasouA YamasouA commented Nov 17, 2024

part of #361
I implement kill test case in runtime-tools to youki.

@YamasouA YamasouA changed the title [WIP] add kill test add kill test Nov 17, 2024
@YJDoc2
Copy link
Collaborator

YJDoc2 commented Nov 18, 2024

@YamasouA please sign your commits. The instructions can be found at https://github.com/youki-dev/youki/pull/2996/checks?check_run_id=33094881373

Signed-off-by: Akiyama <[email protected]>
Signed-off-by: Akiyama <[email protected]>
@YamasouA
Copy link
Author

@YJDoc2
Thank you for your review!
I pass DCO.

Comment on lines +104 to +108
let kill_test = ConditionalTest::new(
"test_kill_container",
Box::new(|| true),
Box::new(run_kill_test_cases),
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use normal test instead of ConditionalTest here, that will not require a conditional function.

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Nov 23, 2024

Hey @YamasouA , thanks for the PR. I have taken a basic look, and want to request a change -
The go tests usually put all test cases in a single function, but here we try to separate each test case as a different test, so it is easier to understand and maintain. see the code in #2976 , how it has created one test function for readonly=true and another for readonly=false.

Can I request you to change this code to split each test condition into its own testcase? So it will be one function for testing kill without id, one for kill non-existing container and so on.

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

Successfully merging this pull request may close these issues.

2 participants