-
Notifications
You must be signed in to change notification settings - Fork 717
Refactor container_list_windows_test.go to use Tigron #4643
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
base: main
Are you sure you want to change the base?
Refactor container_list_windows_test.go to use Tigron #4643
Conversation
Signed-off-by: Deepam Goyal <[email protected]>
|
CI seems failing |
| testCase.Require = &test.Requirement{ | ||
| Check: func(_ test.Data, _ test.Helpers) (bool, string) { | ||
| if !testutil.HyperVSupported() { | ||
| return false, "HyperV is not enabled, skipping test" | ||
| } | ||
| return true, "" | ||
| }, |
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.
IMO, better to use this variable:
| // Wait for container to start - using polling | ||
| helpers.Ensure("exec", testContainerName, "echo", "ready") |
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.
Is there a reason you're using helpers.Ensure instead of nerdtest.EnsureContainerStarted ?
| inspectOutput := helpers.Capture("inspect", containerName, "--format", "json") | ||
|
|
||
| var inspect []dockercompat.Container | ||
| err := json.Unmarshal([]byte(inspectOutput), &inspect) | ||
| assert.NilError(helpers.T(), err, "failed to unmarshal inspect output") | ||
| assert.Assert(helpers.T(), len(inspect) > 0, "expected at least one container in inspect 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.
Can we use nerdtest.InspectContainer function to get nerdctl inspect <container name> result?
Updates tests to use nerdtest.Setup and the Tigron testing framework, #4613.
Sorry for the delay, I was having trouble running the tests locally and have solved it partly now. If this looks good, I can pick up more test files.