Skip to content

test: refactor TestNetworkInspect in network_inspect_test.go #4310

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

Merged
merged 2 commits into from
Jun 11, 2025

Conversation

haytok
Copy link
Contributor

@haytok haytok commented Jun 8, 2025

Based on the following three pieces of advice received in the merged PR, this commit refactors the tests.

Do you think we could also have a test for some-network and some-network-as-well to demonstrate no false positive on matching some-network?

Also, this PR adds one test case to TestNetworkInspect based on this comment.

@apostasie
Copy link
Contributor

Thanks a lot @haytok
Appreciated.

Do you think we could also have a test for some-network and some-network-as-well to demonstrate no false positive on matching some-network?

haytok added 2 commits June 9, 2025 15:23
Based on the following three pieces of advice received in the merged PR,
this commit refactors the tests.

- containerd#4309 (comment)
- containerd#4309 (comment)
- containerd#4309 (comment)

Signed-off-by: Hayato Kiwata <[email protected]>
Suppose that a `container A` is running in the network
`some-network-as-well`.

In this case, this commit adds a test to ensure that `container A` isn't
displayed in the `Containers` section of the output of
`nerdctl network inspect some-network`.

Signed-off-by: Hayato Kiwata <[email protected]>
@haytok haytok force-pushed the refactor_network_inspect_test.go branch from e3780ff to fee517a Compare June 9, 2025 15:45
@AkihiroSuda AkihiroSuda added this to the v2.1.3 milestone Jun 11, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 401800a into containerd:main Jun 11, 2025
56 of 58 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