Skip to content

integration/container: Migrate TestAPIStatsNetworkStats to integratio…#52096

Open
deahtstroke wants to merge 1 commit intomoby:masterfrom
deahtstroke:50159-migrate-TestAPIStatsNetworkStats-from-integration-cli
Open

integration/container: Migrate TestAPIStatsNetworkStats to integratio…#52096
deahtstroke wants to merge 1 commit intomoby:masterfrom
deahtstroke:50159-migrate-TestAPIStatsNetworkStats-from-integration-cli

Conversation

@deahtstroke
Copy link
Copy Markdown

@deahtstroke deahtstroke commented Feb 26, 2026

- What I did
Migrated the test TestAPIStatsNetworkStats to integration/ from the integration-cli/ suite in reference to epic #50159.

Please Note:
This is a copy of my other PR. I mistakingly did an interactive rebase when updating my branch to be up to date and it got very messy, so I thought it'd be best to just close the original and start another one. Nothing has changed. Apologies, I'm still new to using rebasing on my normal workflow.

- How I did it
Using test on integration-cli/docker_api_stats_test.go and slightly tweaking it to use the go-client instead of the direct CLI.

- How to verify it
Run using the integration test directive in the makefile:

TESTDIRS='./integration/container/' TESTFLAGS='-test.run TestStatsNetworkStats' make test-integration

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)
image

Comment thread integration/container/stats_test.go Outdated
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/client"
"github.com/moby/moby/v2/integration/internal/container"
"github.com/stretchr/testify/require"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh! can you use gotest.tools/v3 instead? We have stretchr as dependency (for one package IIRC), but use gotest.tools for everything else 😅

@deahtstroke deahtstroke requested a review from tianon as a code owner March 29, 2026 20:00
@deahtstroke deahtstroke force-pushed the 50159-migrate-TestAPIStatsNetworkStats-from-integration-cli branch 3 times, most recently from d97ead5 to 9791acc Compare March 29, 2026 20:51
@deahtstroke
Copy link
Copy Markdown
Author

I accidentally pull changes without the --rebase flag and it replayed a lot of commits into this branch and the labeler picked up on that. Could a maintainer help me cleaning up the labels on this PR?

@deahtstroke deahtstroke force-pushed the 50159-migrate-TestAPIStatsNetworkStats-from-integration-cli branch from 9791acc to 919e946 Compare May 4, 2026 20:02
@deahtstroke
Copy link
Copy Markdown
Author

Just rebased on latest master to keep the branch up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants