-
Notifications
You must be signed in to change notification settings - Fork 351
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
refactor(test): refine function create_container #2973
refactor(test): refine function create_container #2973
Conversation
Hey @xujihui1985 thanks! I'll try to get to this in this week. |
Also, would you be willing to wait for few other PRs to be merged before this? There are several other test PRs which are in review, and if possible, I'd like to merge them before and ask you to rebase on main after that so there are no tests with older impl. If you're fine, I'll ping you once this is ready to rebase. |
sure, no rush. take your time |
@xujihui1985 , please go ahead and rebase this on main. Once this is updated, I'll merge 👍 |
add CreateOptions as para to function create_container for create container with different options Signed-off-by: xujihui1985 <xujihui1985@gmail.com>
fac48fd
to
17f2131
Compare
Signed-off-by: xujihui1985 <xujihui1985@gmail.com>
I have rebased from main branch and fix all the tests |
let create_process = create_container(&id_str, &bundle).unwrap(); | ||
// here we do not wait for the process by calling wait() as in the test_outside_container | ||
// function because we need the output of the runtimetest. If we call wait, it will return | ||
// and we won't have an easy way of getting the stdio of the runtimetest. | ||
// Thus to make sure the container is created, we just wait for sometime, and | ||
// assume that the create command was successful. If it wasn't we can catch that error | ||
// in the start_container, as we can not start a non-created container anyways | ||
std::thread::sleep(std::time::Duration::from_millis(1000)); | ||
match start_container(&id_str, &bundle) | ||
.unwrap() | ||
.wait_with_output() |
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.
This diff is wild! 😂
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.
LGTM! Thanks for your efforts!
* refactor(test): refine function create_container add CreateOptions as para to function create_container for create container with different options Signed-off-by: xujihui1985 <xujihui1985@gmail.com> * fix: fix failed unittest Signed-off-by: xujihui1985 <xujihui1985@gmail.com> --------- Signed-off-by: xujihui1985 <xujihui1985@gmail.com>
* refactor(test): refine function create_container add CreateOptions as para to function create_container for create container with different options Signed-off-by: xujihui1985 <xujihui1985@gmail.com> * fix: fix failed unittest Signed-off-by: xujihui1985 <xujihui1985@gmail.com> --------- Signed-off-by: xujihui1985 <xujihui1985@gmail.com>
* refactor(test): refine function create_container add CreateOptions as para to function create_container for create container with different options Signed-off-by: xujihui1985 <xujihui1985@gmail.com> * fix: fix failed unittest Signed-off-by: xujihui1985 <xujihui1985@gmail.com> --------- Signed-off-by: xujihui1985 <xujihui1985@gmail.com> Signed-off-by: Akiyama <akiakiskyhand@gmail.com>
add CreateOptions as para to function create_container for create container with different options
this is a followup PR for #2923