Removed 2nd arg "cs" from TestVolumeClient

as we assume it is always set to f.ClientSet and we can
use its value from passed framework argument.
This commit is contained in:
Olev Kartau 2019-10-28 15:07:49 +02:00
parent 0064349ec5
commit 4f75ed2a94
5 changed files with 9 additions and 9 deletions

View File

@ -91,7 +91,7 @@ var _ = ginkgo.Describe("[sig-storage] GCP Volumes", func() {
}
// Must match content of test/images/volumes-tester/nfs/index.html
volume.TestVolumeClient(f, c, config, nil, "" /* fsType */, tests)
volume.TestVolumeClient(f, config, nil, "" /* fsType */, tests)
})
})
@ -114,7 +114,7 @@ var _ = ginkgo.Describe("[sig-storage] GCP Volumes", func() {
},
}
// Must match content of test/images/volume-tester/nfs/index.html
volume.TestVolumeClient(f, c, config, nil, "" /* fsType */, tests)
volume.TestVolumeClient(f, config, nil, "" /* fsType */, tests)
})
})
@ -147,7 +147,7 @@ var _ = ginkgo.Describe("[sig-storage] GCP Volumes", func() {
ExpectedContent: "Hello from GlusterFS!",
},
}
volume.TestVolumeClient(f, c, config, nil, "" /* fsType */, tests)
volume.TestVolumeClient(f, config, nil, "" /* fsType */, tests)
})
})
})

View File

@ -574,13 +574,13 @@ func testVolumeContent(f *framework.Framework, pod *v1.Pod, fsGroup *int64, fsTy
// and check that the pod sees expected data, e.g. from the server pod.
// Multiple Tests can be specified to mount multiple volumes to a single
// pod.
func TestVolumeClient(f *framework.Framework, client clientset.Interface, config TestConfig, fsGroup *int64, fsType string, tests []Test) {
clientPod, err := runVolumeTesterPod(client, config, "client", false, fsGroup, tests)
func TestVolumeClient(f *framework.Framework, config TestConfig, fsGroup *int64, fsType string, tests []Test) {
clientPod, err := runVolumeTesterPod(f.ClientSet, config, "client", false, fsGroup, tests)
if err != nil {
framework.Failf("Failed to create client pod: %v", err)
}
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(client, clientPod))
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(f.ClientSet, clientPod))
testVolumeContent(f, clientPod, fsGroup, fsType, tests)
}

View File

@ -62,7 +62,7 @@ func testFlexVolume(driver string, cs clientset.Interface, config volume.TestCon
ExpectedContent: "Hello from flexvolume!",
},
}
volume.TestVolumeClient(f, cs, config, nil, "" /* fsType */, tests)
volume.TestVolumeClient(f, config, nil, "" /* fsType */, tests)
volume.TestCleanup(f, config)
}

View File

@ -180,7 +180,7 @@ func (t *volumesTestSuite) defineTests(driver TestDriver, pattern testpatterns.T
// not before starting the second pod.
volume.InjectContent(f, f.ClientSet, config, fsGroup, pattern.FsType, tests)
if driver.GetDriverInfo().Capabilities[CapPersistence] {
volume.TestVolumeClient(f, f.ClientSet, config, fsGroup, pattern.FsType, tests)
volume.TestVolumeClient(f, config, fsGroup, pattern.FsType, tests)
} else {
ginkgo.By("Skipping persistence check for non-persistent volume")
}

View File

@ -108,7 +108,7 @@ var _ = utils.SIGDescribe("Volumes", func() {
ExpectedContent: "this is the second file",
},
}
volume.TestVolumeClient(f, cs, config, nil, "" /* fsType */, tests)
volume.TestVolumeClient(f, config, nil, "" /* fsType */, tests)
})
})
})