From 14a94d214f14ce8eb53570f9454a17520ee26e1d Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Fri, 14 May 2021 10:46:01 -0700 Subject: [PATCH 1/6] Skip network test with kindnet if container runtime is not docker --- test/integration/net_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/integration/net_test.go b/test/integration/net_test.go index 36ced3d1e3..0022e5d8b9 100644 --- a/test/integration/net_test.go +++ b/test/integration/net_test.go @@ -69,6 +69,10 @@ func TestNetworkPlugins(t *testing.T) { t.Skipf("flannel is not yet compatible with Docker driver: iptables v1.8.3 (legacy): Couldn't load target `CNI-x': No such file or directory") } + if !DockerDriver() && tc.name == "kindnet" { + t.Skipf("Skipping the test as %s container runtimes requires CNI", ContainerRuntime()) + } + start := time.Now() MaybeParallel(t) profile := UniqueProfileName(tc.name) From 94c338acffcaa73078864c57c15e64cbfe4d558c Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Fri, 14 May 2021 12:03:05 -0700 Subject: [PATCH 2/6] Add comment --- test/integration/net_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/net_test.go b/test/integration/net_test.go index 0022e5d8b9..ea1b5a0943 100644 --- a/test/integration/net_test.go +++ b/test/integration/net_test.go @@ -70,6 +70,8 @@ func TestNetworkPlugins(t *testing.T) { } if !DockerDriver() && tc.name == "kindnet" { + // CNI is disabled when --network-plugin=kubenet option is passed. See cni.New(..) function + // But for containerd/cri-o CNI has to be configured t.Skipf("Skipping the test as %s container runtimes requires CNI", ContainerRuntime()) } From 2977b9baab9f12159fa0804388b9c03f4ad93b15 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Fri, 14 May 2021 12:05:22 -0700 Subject: [PATCH 3/6] Add comment --- test/integration/net_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/net_test.go b/test/integration/net_test.go index ea1b5a0943..fb7afe6990 100644 --- a/test/integration/net_test.go +++ b/test/integration/net_test.go @@ -69,7 +69,7 @@ func TestNetworkPlugins(t *testing.T) { t.Skipf("flannel is not yet compatible with Docker driver: iptables v1.8.3 (legacy): Couldn't load target `CNI-x': No such file or directory") } - if !DockerDriver() && tc.name == "kindnet" { + if !DockerDriver() && tc.name == "kubenet" { // CNI is disabled when --network-plugin=kubenet option is passed. See cni.New(..) function // But for containerd/cri-o CNI has to be configured t.Skipf("Skipping the test as %s container runtimes requires CNI", ContainerRuntime()) From 7f6aac1c6ade1b70a69ba22d8b52892f6933a4a0 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Fri, 14 May 2021 16:06:17 -0700 Subject: [PATCH 4/6] trigger build --- test/integration/net_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/net_test.go b/test/integration/net_test.go index fb7afe6990..b3b85aebcf 100644 --- a/test/integration/net_test.go +++ b/test/integration/net_test.go @@ -71,7 +71,7 @@ func TestNetworkPlugins(t *testing.T) { if !DockerDriver() && tc.name == "kubenet" { // CNI is disabled when --network-plugin=kubenet option is passed. See cni.New(..) function - // But for containerd/cri-o CNI has to be configured + // But for containerd/crio CNI has to be configured t.Skipf("Skipping the test as %s container runtimes requires CNI", ContainerRuntime()) } From 3ccae6c6dbf91660feef124378a9d36a3f2d0bc5 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Fri, 14 May 2021 17:36:29 -0700 Subject: [PATCH 5/6] trigger build --- test/integration/net_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/net_test.go b/test/integration/net_test.go index b3b85aebcf..d2aba64a3a 100644 --- a/test/integration/net_test.go +++ b/test/integration/net_test.go @@ -73,6 +73,7 @@ func TestNetworkPlugins(t *testing.T) { // CNI is disabled when --network-plugin=kubenet option is passed. See cni.New(..) function // But for containerd/crio CNI has to be configured t.Skipf("Skipping the test as %s container runtimes requires CNI", ContainerRuntime()) + return } start := time.Now() From 967aa73ea4c6c239450110c2dd6a74ac5fb97499 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Mon, 17 May 2021 10:40:51 -0700 Subject: [PATCH 6/6] fix container runtime check --- test/integration/net_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/integration/net_test.go b/test/integration/net_test.go index d2aba64a3a..757de49817 100644 --- a/test/integration/net_test.go +++ b/test/integration/net_test.go @@ -69,11 +69,10 @@ func TestNetworkPlugins(t *testing.T) { t.Skipf("flannel is not yet compatible with Docker driver: iptables v1.8.3 (legacy): Couldn't load target `CNI-x': No such file or directory") } - if !DockerDriver() && tc.name == "kubenet" { + if ContainerRuntime() != "docker" && tc.name == "kubenet" { // CNI is disabled when --network-plugin=kubenet option is passed. See cni.New(..) function // But for containerd/crio CNI has to be configured t.Skipf("Skipping the test as %s container runtimes requires CNI", ContainerRuntime()) - return } start := time.Now()