Skip to content

migrate TestAPISwarmErrorHandling to Integration Test#51839

Open
2003Aditya wants to merge 1 commit intomoby:masterfrom
2003Aditya:TestAPISwarmErrorHandling
Open

migrate TestAPISwarmErrorHandling to Integration Test#51839
2003Aditya wants to merge 1 commit intomoby:masterfrom
2003Aditya:TestAPISwarmErrorHandling

Conversation

@2003Aditya
Copy link
Contributor

- What I did
Migrated the TestAPISwarmErrorHandling test from integration-cli/docker_api_swarm_test.go to the new integration test framework under integration/service/swarm_test.go.

Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
@2003Aditya 2003Aditya force-pushed the TestAPISwarmErrorHandling branch from e906527 to af7afcc Compare January 11, 2026 17:38
@robmry
Copy link
Contributor

robmry commented Jan 12, 2026

The new test is failing ...

=== FAIL: arm64.docker.docker.integration.service TestSwarmErrorHandling (0.62s)
    swarm_test.go:35: assertion failed: expected error to contain "address already in use", got "Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on different interfaces (172.17.0.3 on eth0 and 172.22.0.1 on docker_gwbridge)"

The original test did this - so something similar probably needs to be carried over. It'd be worth looking in a bit more detail than I have at that function does, the migrated tests are likely to need something similar? ...

The test is renamed from TestSwarmAPIErrorHandling to TestSwarmErrorHandling ... the "API" in the old name hinted that the test's something to do with the API - but maybe something like TestSwarmSocketInUse would be better name?

(And, nit: blank line at the end of the test!)

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