Merge pull request #70823 from mkimuram/issue/70822
Fix volumes e2e test to check fsType
This commit is contained in:
@@ -401,7 +401,7 @@ func VolumeTestCleanup(f *Framework, config VolumeTestConfig) {
|
||||
// and check that the pod sees expected data, e.g. from the server pod.
|
||||
// Multiple VolumeTests can be specified to mount multiple volumes to a single
|
||||
// pod.
|
||||
func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGroup *int64, tests []VolumeTest) {
|
||||
func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGroup *int64, fsType string, tests []VolumeTest) {
|
||||
By(fmt.Sprint("starting ", config.Prefix, " client"))
|
||||
var gracePeriod int64 = 1
|
||||
clientPod := &v1.Pod{
|
||||
@@ -476,6 +476,12 @@ func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGro
|
||||
_, err = LookForStringInPodExec(config.Namespace, clientPod.Name, []string{"ls", "-ld", "/opt/0"}, strconv.Itoa(int(*fsGroup)), time.Minute)
|
||||
Expect(err).NotTo(HaveOccurred(), "failed: getting the right privileges in the file %v", int(*fsGroup))
|
||||
}
|
||||
|
||||
if fsType != "" {
|
||||
By("Checking fsType is correct.")
|
||||
_, err = LookForStringInPodExec(config.Namespace, clientPod.Name, []string{"grep", " /opt/0 ", "/proc/mounts"}, fsType, time.Minute)
|
||||
Expect(err).NotTo(HaveOccurred(), "failed: getting the right fsType %s", fsType)
|
||||
}
|
||||
}
|
||||
|
||||
// Insert index.html with given content into given volume. It does so by
|
||||
|
||||
Reference in New Issue
Block a user