Browse code

Disable iptables/ip6tables in two tests to remove conflict

TestAttachDisconnectLeak starts its own daemon with iptables disabled,
but disabling ip6tables was missed when we enabled ip6tables by default.

TestNetworkStateCleanupOnDaemonStart also starts its own daemon, with
iptables and ip6tables both enabled. It isn't trying to test anything
iptables related.

These tests run in parallel, so they both modify ip6tables in the host
namespace - and could break each other by adding/removing chains at
awkward moments.

Disable iptables and ip6tables in both tests.

Signed-off-by: Rob Murray <rob.murray@docker.com>

Rob Murray authored on 2024/10/11 21:59:03
Showing 2 changed files
... ...
@@ -77,7 +77,7 @@ func TestAttachDisconnectLeak(t *testing.T) {
77 77
 	d := daemon.New(t)
78 78
 	defer d.Cleanup(t)
79 79
 
80
-	d.StartWithBusybox(ctx, t, "--iptables=false")
80
+	d.StartWithBusybox(ctx, t, "--iptables=false", "--ip6tables=false")
81 81
 
82 82
 	client := d.NewClientT(t)
83 83
 
... ...
@@ -67,7 +67,7 @@ func TestNetworkStateCleanupOnDaemonStart(t *testing.T) {
67 67
 	d := daemon.New(t)
68 68
 	defer d.Cleanup(t)
69 69
 
70
-	d.StartWithBusybox(ctx, t)
70
+	d.StartWithBusybox(ctx, t, "--iptables=false", "--ip6tables=false")
71 71
 	defer d.Stop(t)
72 72
 
73 73
 	apiClient := d.NewClientT(t)