Skip to content

test: refactor container_inspect_windows_test.go to use Tigron#4714

Merged
ChengyuZhu6 merged 1 commit intocontainerd:mainfrom
JoonsooWon:issues_4613_container_inspect_windows_test.go
Feb 2, 2026
Merged

test: refactor container_inspect_windows_test.go to use Tigron#4714
ChengyuZhu6 merged 1 commit intocontainerd:mainfrom
JoonsooWon:issues_4613_container_inspect_windows_test.go

Conversation

@JoonsooWon
Copy link
Contributor

related : #4613

Comment on lines 55 to 61
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"])
},
Copy link
Member

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?

Copy link
Contributor Author

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.

Comment on lines 92 to 98
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"])
},
Copy link
Member

Choose a reason for hiding this comment

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

Same as before.

Comment on lines -58 to -60
isHypervContainer, err := testutil.HyperVContainer(inspect)
if err != nil {
t.Fatalf("unable to list HCS containers: %s", err)
Copy link
Member

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.

Copy link
Contributor Author

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

@JoonsooWon JoonsooWon force-pushed the issues_4613_container_inspect_windows_test.go branch from 6a3b6e6 to dafb80c Compare January 24, 2026 00:39
Copy link
Member

@haytok haytok left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!

@haytok
Copy link
Member

haytok commented Jan 25, 2026

CC: @ChengyuZhu6 @AkihiroSuda

When you have time, could you retry the CI and review 🙏

@ChengyuZhu6
Copy link
Member

Please rebase on main branch to pickup the changes.

Signed-off-by: Joonsoo Won <wonjs0116@gmail.com>
@JoonsooWon JoonsooWon force-pushed the issues_4613_container_inspect_windows_test.go branch from dafb80c to 4519b52 Compare February 1, 2026 11:47
@JoonsooWon
Copy link
Contributor Author

Thanks!
I've rebased on main branch.

Copy link
Member

@ChengyuZhu6 ChengyuZhu6 left a comment

Choose a reason for hiding this comment

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

LGTM

@ChengyuZhu6 ChengyuZhu6 merged commit efe8c5f into containerd:main Feb 2, 2026
134 of 148 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants