From 4f75ed2a943ea6f0f8e8fa9e9e48636f2c83c060 Mon Sep 17 00:00:00 2001 From: Olev Kartau Date: Mon, 28 Oct 2019 15:07:49 +0200 Subject: [PATCH] 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. --- test/e2e/common/volumes.go | 6 +++--- test/e2e/framework/volume/fixtures.go | 6 +++--- test/e2e/storage/flexvolume.go | 2 +- test/e2e/storage/testsuites/volumes.go | 2 +- test/e2e/storage/volumes.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/e2e/common/volumes.go b/test/e2e/common/volumes.go index 9794a3edad6..b4e0eae2f4b 100644 --- a/test/e2e/common/volumes.go +++ b/test/e2e/common/volumes.go @@ -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) }) }) }) diff --git a/test/e2e/framework/volume/fixtures.go b/test/e2e/framework/volume/fixtures.go index d2d64e16924..ff6957647b4 100644 --- a/test/e2e/framework/volume/fixtures.go +++ b/test/e2e/framework/volume/fixtures.go @@ -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) } diff --git a/test/e2e/storage/flexvolume.go b/test/e2e/storage/flexvolume.go index 45623996953..377e749bc6b 100644 --- a/test/e2e/storage/flexvolume.go +++ b/test/e2e/storage/flexvolume.go @@ -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) } diff --git a/test/e2e/storage/testsuites/volumes.go b/test/e2e/storage/testsuites/volumes.go index e76bddf3f47..550223b0e92 100644 --- a/test/e2e/storage/testsuites/volumes.go +++ b/test/e2e/storage/testsuites/volumes.go @@ -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") } diff --git a/test/e2e/storage/volumes.go b/test/e2e/storage/volumes.go index 3b2a5b04af7..783f7152f1e 100644 --- a/test/e2e/storage/volumes.go +++ b/test/e2e/storage/volumes.go @@ -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) }) }) })