From 77dfd63d1dbe24bd96e579a6bea5c4fb3732d81d Mon Sep 17 00:00:00 2001 From: carlory Date: Thu, 19 Oct 2023 14:16:59 +0800 Subject: [PATCH] fix volume conformance e2e test break other test --- test/e2e/storage/persistent_volumes.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/e2e/storage/persistent_volumes.go b/test/e2e/storage/persistent_volumes.go index 046a01f3c13..d61c75bad63 100644 --- a/test/e2e/storage/persistent_volumes.go +++ b/test/e2e/storage/persistent_volumes.go @@ -452,8 +452,9 @@ var _ = utils.SIGDescribe("PersistentVolumes", func() { pvNamePrefix := ns + "-" pvHostPathConfig := e2epv.PersistentVolumeConfig{ - NamePrefix: pvNamePrefix, - Labels: volLabel, + NamePrefix: pvNamePrefix, + Labels: volLabel, + StorageClassName: ns, PVSource: v1.PersistentVolumeSource{ CSI: &v1.CSIPersistentVolumeSource{ Driver: csiDriver.Name, @@ -461,6 +462,9 @@ var _ = utils.SIGDescribe("PersistentVolumes", func() { }, }, } + pvcConfig := e2epv.PersistentVolumeClaimConfig{ + StorageClassName: &ns, + } numPVs, numPVCs := 1, 1 pvols, claims, err = e2epv.CreatePVsPVCs(ctx, numPVs, numPVCs, c, f.Timeouts, ns, pvHostPathConfig, pvcConfig) @@ -669,6 +673,10 @@ var _ = utils.SIGDescribe("PersistentVolumes", func() { }, } + pvcConfig := e2epv.PersistentVolumeClaimConfig{ + StorageClassName: &ns, + } + numPVs, numPVCs := 1, 1 pvols, claims, err = e2epv.CreatePVsPVCs(ctx, numPVs, numPVCs, c, f.Timeouts, ns, pvHostPathConfig, pvcConfig) framework.ExpectNoError(err, "Failed to create the requested storage resources")