Skip to content

Clean up networks in 'integration/network' tests#48217

Merged
robmry merged 1 commit intomoby:masterfrom
robmry:network_test_cleanup
Jul 24, 2024
Merged

Clean up networks in 'integration/network' tests#48217
robmry merged 1 commit intomoby:masterfrom
robmry:network_test_cleanup

Conversation

@robmry
Copy link
Copy Markdown
Contributor

@robmry robmry commented Jul 23, 2024

- What I did

Clean up networks in 'integration/network' tests

Makes TestDaemonDefaultNetworkPools re-runnable, and stops the accumulation of bridges from the others.

- How I did it

- How to verify it

Three consecutive runs of TEST_INTEGRATION_DIR=./integration/network ./hack/make.sh test-integration passed, and didn't leave behind any br-blah bridges.

Makes TestDaemonDefaultNetworkPools re-runnable, and stops the
accumulation of bridges from the others.

Signed-off-by: Rob Murray <[email protected]>
@robmry robmry added area/networking Networking kind/refactor PR's that refactor, or clean-up code area/networking/d/bridge Networking labels Jul 23, 2024
@robmry robmry added this to the 28.0.0 milestone Jul 23, 2024
@robmry robmry requested review from akerouanton and corhere July 23, 2024 09:48
@robmry robmry self-assigned this Jul 23, 2024
@thaJeztah
Copy link
Copy Markdown
Member

oh! I recall I had a PR trying to do something similar, but I never got that to work; just in case it's useful, you could have a peek at it (if there's bit you could either use, or if there's other tests that should get the same treatment);

@robmry
Copy link
Copy Markdown
Contributor Author

robmry commented Jul 23, 2024

oh! I recall I had a PR trying to do something similar, but I never got that to work; just in case it's useful, you could have a peek at it (if there's bit you could either use, or if there's other tests that should get the same treatment);

Right, yes - same area ... I was mostly interested in tidying up the extra bridges, particularly for TestDaemonDefaultNetworkPools where they made a re-run of the test fail.

But, the changes also make sure docker0 is deleted if its address may have come from a modified address-pool.

I don't think modified default pool will necessarily be used in most of the tests, they don't delete docker0 first like TestDaemonDefaultNetworkPools does. They'll only use the defaults if they follow another test that deleted it, but the docker0 address seems irrelevant in most if not all of those tests. That could do with some more tidying, but this change at-least makes the tests re-runnable, and gets rid of some bridge devices they previously left behind.

@robmry
Copy link
Copy Markdown
Contributor Author

robmry commented Jul 24, 2024

I'll merge this ... there's undoubtedly more to do, but this is progress.

@robmry robmry merged commit 48877c6 into moby:master Jul 24, 2024
@robmry robmry deleted the network_test_cleanup branch July 24, 2024 08:16
@thaJeztah
Copy link
Copy Markdown
Member

I'll merge this ... there's undoubtedly more to do, but this is progress.

Oh! Yes, for sure! Sorry, thought I replied 🙈

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

Labels

area/networking/d/bridge Networking area/networking Networking kind/refactor PR's that refactor, or clean-up code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants