The unit test case of the current libnetwork code cannot pass the test
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
[root@localhost libnetwork]# pwd
/root/src/github.com/docker/libnetwork
[root@localhost libnetwork]# export GOPATH=/root
[root@localhost libnetwork]# go test -v github.com/docker/libnetwork
=== RUN TestErrorInterfaces
--- PASS: TestErrorInterfaces (0.00s)
=== RUN TestNetworkMarshalling
--- PASS: TestNetworkMarshalling (0.00s)
=== RUN TestEndpointMarshalling
--- PASS: TestEndpointMarshalling (0.00s)
=== RUN TestAuxAddresses
--- PASS: TestAuxAddresses (0.02s)
=== RUN TestSRVServiceQuery
time="2019-08-01T19:34:51+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge/2593a7914aa4caf8581d86f931a8298b4d2398d4c448093ce01806930515eb04/ is not added to the store"
time="2019-08-01T19:34:51+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/cc6eadd86b5777ac5f70a92d430d2f2f5041baafd2c1a5b19c4e960291d03d8c/ is not added to the store"
time="2019-08-01T19:34:52+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/cc6eadd86b5777ac5f70a92d430d2f2f5041baafd2c1a5b19c4e960291d03d8c/ is not added to the store"
time="2019-08-01T19:34:52+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/cc6eadd86b5777ac5f70a92d430d2f2f5041baafd2c1a5b19c4e960291d03d8c/ is not added to the store"
--- PASS: TestSRVServiceQuery (2.37s)
=== RUN TestServiceVIPReuse
time="2019-08-01T19:34:53+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge/6a962c5eb2fb1cc201c7faee4ca287d7ed7a3565944c9cfc8d0e4952d7ebf74f/ is not added to the store"
time="2019-08-01T19:34:54+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/4168ee8a025cae49296b5bea3a4a4311c1bd29c89d5d29204b4eabe42d61af3d/ is not added to the store"
time="2019-08-01T19:34:55+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/4168ee8a025cae49296b5bea3a4a4311c1bd29c89d5d29204b4eabe42d61af3d/ is not added to the store"
time="2019-08-01T19:34:55+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/4168ee8a025cae49296b5bea3a4a4311c1bd29c89d5d29204b4eabe42d61af3d/ is not added to the store"
--- PASS: TestServiceVIPReuse (2.19s)
=== RUN TestIpamReleaseOnNetDriverFailures
time="2019-08-01T19:34:55+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge/7aaedf8113cdb9d75e617cdf54e39320c33b0f0a50e4551659fea6e5c2ae4047/ is not added to the store"
time="2019-08-01T19:34:56+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge/554f6507f80de0d5d06e4422fdd80fb174dcd5d41dbbc4af144bb184d1b763f0/ is not added to the store"
time="2019-08-01T19:34:56+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/f910d38df917fe1750bb540b9a30112db393098da28bf95379681923b2978900/ is not added to the store"
--- PASS: TestIpamReleaseOnNetDriverFailures (1.36s)
=== RUN TestDNSIPQuery
time="2019-08-01T19:34:57+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge/57f479d32911818cf0f70c6c67268e6fc4de6c2ede39e13db9202aa018d66d31/ is not added to the store"
time="2019-08-01T19:34:57+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/8060b9c3bf81cc632d0d9854d7dd8e423fc491358efa171c79088aec34837640/ is not added to the store"
time="2019-08-01T19:34:57+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/8060b9c3bf81cc632d0d9854d7dd8e423fc491358efa171c79088aec34837640/ is not added to the store"
time="2019-08-01T19:34:57+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge-endpoint/8060b9c3bf81cc632d0d9854d7dd8e423fc491358efa171c79088aec34837640/ is not added to the store"
--- PASS: TestDNSIPQuery (1.20s)
resolver_test.go:137: Response: ;; opcode: QUERY, status: NOERROR, id: 30768
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;name1 IN A
;; ANSWER SECTION:
name1 600 IN A 192.168.0.1
resolver_test.go:137: Response: ;; opcode: QUERY, status: NOERROR, id: 63462
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;NaMe1 IN A
;; ANSWER SECTION:
NaMe1 600 IN A 192.168.0.1
resolver_test.go:157: Response: ;; opcode: QUERY, status: NOERROR, id: 8167
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;name1 IN MX
resolver_test.go:169: Response: ;; opcode: QUERY, status: SERVFAIL, id: 26570
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;nonexistent IN MX
=== RUN TestDNSProxyServFail
--- FAIL: TestDNSProxyServFail (0.00s)
resolver_test.go:225: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/br-4e578b5de7d3/route_localnet: no such file or directory
=== RUN TestSandboxAddEmpty
--- PASS: TestSandboxAddEmpty (0.27s)
=== RUN TestSandboxAddMultiPrio
--- PASS: TestSandboxAddMultiPrio (3.99s)
=== RUN TestSandboxAddSamePrio
--- PASS: TestSandboxAddSamePrio (3.80s)
=== RUN TestCleanupServiceDiscovery
time="2019-08-01T19:35:06+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge/8521daf3aaed24341a87bcd8db7de6b49d4877fc189b297e2b8e61d52a4297a1/ is not added to the store"
time="2019-08-01T19:35:06+08:00" level=warning msg="bridge store not initialized. kv object docker/network/v1.0/bridge/8668f10b0cbf7098ab98400b205a09cde2e11e104108375a27bbdaeac71ad443/ is not added to the store"
--- PASS: TestCleanupServiceDiscovery (0.67s)
=== RUN TestDNSOptions
--- PASS: TestDNSOptions (0.61s)
=== RUN TestBoltdbBackend
time="2019-08-01T19:35:07+08:00" level=warning msg="Cannot restore overlay endpoints because local datastore is missing"
time="2019-08-01T19:35:08+08:00" level=warning msg="Cannot restore overlay endpoints because local datastore is missing"
time="2019-08-01T19:35:08+08:00" level=info msg="Removing stale endpoint newendpoint (a4e9bf252977fea60c0a4adb5e88558a4017592385994ce639127e7c4560f792)"
time="2019-08-01T19:35:08+08:00" level=info msg="Fixing inconsistent endpoint_cnt for network host. Expected=0, Actual=1"
time="2019-08-01T19:35:08+08:00" level=info msg="Removing stale endpoint newendpoint (e62ca697d440e560b6ecf3ecac9d084f5a7839f132dd12775a1d12193a505fda)"
time="2019-08-01T19:35:08+08:00" level=info msg="Fixing inconsistent endpoint_cnt for network host. Expected=0, Actual=1"
--- PASS: TestBoltdbBackend (0.93s)
=== RUN TestNoPersist
--- PASS: TestNoPersist (0.02s)
=== RUN TestMultipleControllersWithSameStore
--- PASS: TestMultipleControllersWithSameStore (0.02s)
=== RUN TestHost
time="2019-08-01T19:35:08+08:00" level=info msg=" does not exist, we create an empty resolv.conf for container"
time="2019-08-01T19:35:08+08:00" level=info msg=" does not exist, we create an empty resolv.conf for container"
time="2019-08-01T19:35:10+08:00" level=info msg=" does not exist, we create an empty resolv.conf for container"
--- PASS: TestHost (2.07s)
=== RUN TestBridgeIpv6FromMac
--- PASS: TestBridgeIpv6FromMac (0.94s)
=== RUN TestEndpointJoin
--- FAIL: TestEndpointJoin (0.02s)
libnetwork_linux_test.go:228: Cannot read IPv6 setup for bridge testnetwork1: open /proc/sys/net/ipv6/conf/testnetwork1/disable_ipv6: no such file or directory
=== RUN TestExternalKey
--- FAIL: TestExternalKey (0.02s)
libnetwork_linux_test.go:395: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestEnableIPv6
--- FAIL: TestEnableIPv6 (0.01s)
libnetwork_linux_test.go:575: Cannot read IPv6 setup for bridge testnetwork: open /proc/sys/net/ipv6/conf/testnetwork/disable_ipv6: no such file or directory
=== RUN TestResolvConfHost
--- PASS: TestResolvConfHost (0.53s)
=== RUN TestResolvConf
--- FAIL: TestResolvConf (0.01s)
libnetwork_linux_test.go:733: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestParallel1
=== PAUSE TestParallel1
=== RUN TestParallel2
=== PAUSE TestParallel2
=== RUN TestParallel3
=== PAUSE TestParallel3
=== RUN TestNullIpam
--- PASS: TestNullIpam (0.00s)
=== RUN TestNull
--- PASS: TestNull (2.32s)
=== RUN TestBridge
--- FAIL: TestBridge (0.01s)
libnetwork_test.go:158: Cannot read IPv6 setup for bridge testnetwork: open /proc/sys/net/ipv6/conf/testnetwork/disable_ipv6: no such file or directory
=== RUN TestUnknownDriver
time="2019-08-01T19:35:14+08:00" level=warning msg="Unable to locate plugin: unknowndriver, retrying in 1s"
time="2019-08-01T19:35:15+08:00" level=warning msg="Unable to locate plugin: unknowndriver, retrying in 2s"
time="2019-08-01T19:35:17+08:00" level=warning msg="Unable to locate plugin: unknowndriver, retrying in 4s"
time="2019-08-01T19:35:21+08:00" level=warning msg="Unable to locate plugin: unknowndriver, retrying in 8s"
--- PASS: TestUnknownDriver (15.05s)
=== RUN TestNilRemoteDriver
time="2019-08-01T19:35:29+08:00" level=warning msg="Unable to locate plugin: framerelay, retrying in 1s"
time="2019-08-01T19:35:30+08:00" level=warning msg="Unable to locate plugin: framerelay, retrying in 2s"
time="2019-08-01T19:35:32+08:00" level=warning msg="Unable to locate plugin: framerelay, retrying in 4s"
time="2019-08-01T19:35:36+08:00" level=warning msg="Unable to locate plugin: framerelay, retrying in 8s"
--- PASS: TestNilRemoteDriver (15.00s)
=== RUN TestNetworkName
--- FAIL: TestNetworkName (0.02s)
libnetwork_test.go:253: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestNetworkType
--- FAIL: TestNetworkType (0.02s)
libnetwork_test.go:279: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestNetworkID
--- FAIL: TestNetworkID (0.01s)
libnetwork_test.go:305: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestDeleteNetworkWithActiveEndpoints
--- FAIL: TestDeleteNetworkWithActiveEndpoints (0.01s)
libnetwork_test.go:332: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestNetworkConfig
--- FAIL: TestNetworkConfig (0.05s)
libnetwork_test.go:437: Cannot read IPv6 setup for bridge br-4339021e0a92: open /proc/sys/net/ipv6/conf/br-4339021e0a92/disable_ipv6: no such file or directory
=== RUN TestUnknownNetwork
--- FAIL: TestUnknownNetwork (0.03s)
libnetwork_test.go:476: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestUnknownEndpoint
--- FAIL: TestUnknownEndpoint (0.02s)
libnetwork_test.go:509: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestNetworkEndpointsWalkers
--- FAIL: TestNetworkEndpointsWalkers (0.02s)
libnetwork_test.go:550: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/network1/route_localnet: no such file or directory
=== RUN TestDuplicateEndpoint
--- FAIL: TestDuplicateEndpoint (0.02s)
libnetwork_test.go:678: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestControllerQuery
--- FAIL: TestControllerQuery (0.02s)
libnetwork_test.go:728: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/network1/route_localnet: no such file or directory
=== RUN TestNetworkQuery
--- FAIL: TestNetworkQuery (0.02s)
libnetwork_test.go:830: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/network1/route_localnet: no such file or directory
=== RUN TestEndpointDeleteWithActiveContainer
--- FAIL: TestEndpointDeleteWithActiveContainer (0.04s)
libnetwork_test.go:977: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestEndpointMultipleJoins
--- FAIL: TestEndpointMultipleJoins (0.02s)
libnetwork_test.go:1052: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testmultiple/route_localnet: no such file or directory
=== RUN TestLeaveAll
--- FAIL: TestLeaveAll (0.02s)
libnetwork_test.go:1120: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestContainerInvalidLeave
--- FAIL: TestContainerInvalidLeave (0.01s)
libnetwork_test.go:1185: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestEndpointUpdateParent
--- FAIL: TestEndpointUpdateParent (0.01s)
libnetwork_test.go:1251: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/testnetwork/route_localnet: no such file or directory
=== RUN TestInvalidRemoteDriver
--- SKIP: TestInvalidRemoteDriver (0.00s)
libnetwork_test.go:1309: Skipping test when not running inside a Container
=== RUN TestValidRemoteDriver
--- SKIP: TestValidRemoteDriver (0.00s)
libnetwork_test.go:1360: Skipping test when not running inside a Container
=== CONT TestParallel1
=== CONT TestParallel3
=== CONT TestParallel2
--- FAIL: TestParallel1 (0.01s)
libnetwork_test.go:1468: Cannot read IPv4 local routing setup: open /proc/sys/net/ipv4/conf/network/route_localnet: no such file or directory
--- FAIL: TestParallel3 (0.02s)
libnetwork_linux_test.go:937: network network2 not found
--- FAIL: TestParallel2 (0.02s)
libnetwork_linux_test.go:937: network network2 not found
FAIL
FAIL github.com/docker/libnetwork 53.979s
[root@localhost libnetwork]#
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing go test -v github.com/docker/libnetwork in the reported environment. Inspect the failures in resolver_test.go, libnetwork_linux_test.go, and libnetwork_test.go, especially the missing /proc/sys/net/ipv4 and /proc/sys/net/ipv6 paths. Done means the affected unit tests pass without those environment-related errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100