Skip to content

Remove libnetwork_test.TestMain#48796

Merged
robmry merged 1 commit intomoby:masterfrom
robmry:remove_libnet_testmain
Oct 30, 2024
Merged

Remove libnetwork_test.TestMain#48796
robmry merged 1 commit intomoby:masterfrom
robmry:remove_libnet_testmain

Conversation

@robmry
Copy link
Copy Markdown
Contributor

@robmry robmry commented Oct 30, 2024

- What I did

- How I did it

Remove libnetwork_test.TestMain.

It only removed the test host's libnet Bolt db file, and didn't need to do that because the tests use a TempDir for it.

- How to verify it

With the TestMain in place, the tests didn't create /var/lib/docker/network/files/local-kv.db. And, with it gone, the file is not modified by the tests.

- Description for the changelog

n/a

It only removed the test host's libnet Bolt db file, and didn't
need to do that because the tests use a TempDir for it.

Signed-off-by: Rob Murray <[email protected]>
@robmry robmry added area/networking Networking kind/refactor PR's that refactor, or clean-up code labels Oct 30, 2024
@robmry robmry added this to the 28.0.0 milestone Oct 30, 2024
@robmry robmry self-assigned this Oct 30, 2024
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
Copy link
Copy Markdown
Member

I think we may be able to get rid of the libnetwork_unix_test.go file as well, and roll that up into the _linux_test.go one, as things are very likely borked on non-linux; https://github.com/moby/moby/blob/fbb595cb66a53573bd5ef29c9eb0825906f028df/libnetwork/libnetwork_unix_test.go

But I'll have a look at that; I think we have some stubs that are just to make it "not barf" on macOS, and there's some bits that pretend they're supporting freebsd that we may want to cleanup as well.

@robmry robmry merged commit 3e96728 into moby:master Oct 30, 2024
@robmry robmry deleted the remove_libnet_testmain branch October 30, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants