-
Notifications
You must be signed in to change notification settings - Fork 733
test: refactor container_inspect_windows_test.go to use Tigron #4714
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?
test: refactor container_inspect_windows_test.go to use Tigron #4714
Conversation
| Output: func(stdout string, t tig.T) { | ||
| containerName := data.Labels().Get("containerName") | ||
| inspect := nerdtest.InspectContainer(helpers, containerName) | ||
| lbs := inspect.Config.Labels | ||
| assert.Equal(t, "foo", lbs["foo"]) | ||
| assert.Equal(t, "bar", lbs["bar"]) | ||
| }, |
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.
Writing nerdctl inspect containerName in the Command section means testing based on the stdout results, which I think is better. WDYT?
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.
I also considered that approach, but I initially kept the previous implementation because of the parsing complexity.
I agree with your point, and I've fixed to use stdout results.
Thanks for the suggestion.
| Output: func(stdout string, t tig.T) { | ||
| containerName := data.Labels().Get("containerName") | ||
| inspect := nerdtest.InspectContainer(helpers, containerName) | ||
| lbs := inspect.Config.Labels | ||
| assert.Equal(t, "foo", lbs["foo"]) | ||
| assert.Equal(t, "bar", lbs["bar"]) | ||
| }, |
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.
Same as before.
| isHypervContainer, err := testutil.HyperVContainer(inspect) | ||
| if err != nil { | ||
| t.Fatalf("unable to list HCS containers: %s", err) |
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.
Equivalent processing also needs to be written in Tigron.
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.
I've fixed it
Thanks
Signed-off-by: Joonsoo Won <wonjs0116@gmail.com>
6a3b6e6 to
dafb80c
Compare
related : #4613