mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
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:
parent
0064349ec5
commit
4f75ed2a94
@ -91,7 +91,7 @@ var _ = ginkgo.Describe("[sig-storage] GCP Volumes", func() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Must match content of test/images/volumes-tester/nfs/index.html
|
// 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
|
// 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!",
|
ExpectedContent: "Hello from GlusterFS!",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
volume.TestVolumeClient(f, c, config, nil, "" /* fsType */, tests)
|
volume.TestVolumeClient(f, config, nil, "" /* fsType */, tests)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -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.
|
// 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
|
// Multiple Tests can be specified to mount multiple volumes to a single
|
||||||
// pod.
|
// pod.
|
||||||
func TestVolumeClient(f *framework.Framework, client clientset.Interface, config TestConfig, fsGroup *int64, fsType string, tests []Test) {
|
func TestVolumeClient(f *framework.Framework, config TestConfig, fsGroup *int64, fsType string, tests []Test) {
|
||||||
clientPod, err := runVolumeTesterPod(client, config, "client", false, fsGroup, tests)
|
clientPod, err := runVolumeTesterPod(f.ClientSet, config, "client", false, fsGroup, tests)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
framework.Failf("Failed to create client pod: %v", err)
|
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)
|
testVolumeContent(f, clientPod, fsGroup, fsType, tests)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ func testFlexVolume(driver string, cs clientset.Interface, config volume.TestCon
|
|||||||
ExpectedContent: "Hello from flexvolume!",
|
ExpectedContent: "Hello from flexvolume!",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
volume.TestVolumeClient(f, cs, config, nil, "" /* fsType */, tests)
|
volume.TestVolumeClient(f, config, nil, "" /* fsType */, tests)
|
||||||
|
|
||||||
volume.TestCleanup(f, config)
|
volume.TestCleanup(f, config)
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ func (t *volumesTestSuite) defineTests(driver TestDriver, pattern testpatterns.T
|
|||||||
// not before starting the second pod.
|
// not before starting the second pod.
|
||||||
volume.InjectContent(f, f.ClientSet, config, fsGroup, pattern.FsType, tests)
|
volume.InjectContent(f, f.ClientSet, config, fsGroup, pattern.FsType, tests)
|
||||||
if driver.GetDriverInfo().Capabilities[CapPersistence] {
|
if driver.GetDriverInfo().Capabilities[CapPersistence] {
|
||||||
volume.TestVolumeClient(f, f.ClientSet, config, fsGroup, pattern.FsType, tests)
|
volume.TestVolumeClient(f, config, fsGroup, pattern.FsType, tests)
|
||||||
} else {
|
} else {
|
||||||
ginkgo.By("Skipping persistence check for non-persistent volume")
|
ginkgo.By("Skipping persistence check for non-persistent volume")
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ var _ = utils.SIGDescribe("Volumes", func() {
|
|||||||
ExpectedContent: "this is the second file",
|
ExpectedContent: "this is the second file",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
volume.TestVolumeClient(f, cs, config, nil, "" /* fsType */, tests)
|
volume.TestVolumeClient(f, config, nil, "" /* fsType */, tests)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user