We set the network plugin to cni with containerd runtime

pull/10428/head
Priya Wadhwa 2021-02-09 14:05:17 -08:00
parent db3bfc3f9e
commit 5364222fc8
1 changed files with 4 additions and 1 deletions

View File

@ -108,9 +108,12 @@ func TestNetworkPlugins(t *testing.T) {
out := rr.Stdout.String()
if tc.kubeletPlugin == "" {
if strings.Contains(out, "--network-plugin") {
if strings.Contains(out, "--network-plugin") && ContainerRuntime() == "docker" {
t.Errorf("expected no network plug-in, got %s", out)
}
if !strings.Contains(out, "--network-plugin=cni") && ContainerRuntime() != "docker" {
t.Errorf("expected cni network plugin with conatinerd/crio, got %s", out)
}
} else {
if !strings.Contains(out, fmt.Sprintf("--network-plugin=%s", tc.kubeletPlugin)) {
t.Errorf("expected --network-plugin=%s, got %s", tc.kubeletPlugin, out)