Skip to content

Commit fa3de07

Browse files
committed
Remove a duplicate StorageClass creation call
The issue on both tests is that before the refactor we had a method that was creating the `StorageClass` manifest only, this manifest was used later to be created by `TestBindingWaitForFirstConsumerMultiPVC`, after the refactor we're ensuring that the `StorageClass` exists as a resource before calling `TestBindingWaitForFirstConsumerMultiPVC` however this method is still attempting to create it, that's the reason behind the error: `resourceVersion should not be set on objects to be created This issue wasn't caught before because `TestBindingWaitForFirstConsumerMultiPVC` is creating the StorageClass without the common utility function, the solution is to remove the snippet that attempts to create the StorageClass againo
1 parent 8724967 commit fa3de07

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

test/e2e/storage/testsuites/provisioning.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -596,14 +596,6 @@ func (t StorageClassTest) TestBindingWaitForFirstConsumerMultiPVC(claims []*v1.P
596596
framework.ExpectNotEqual(len(claims), 0)
597597
namespace := claims[0].Namespace
598598

599-
ginkgo.By("creating a storage class " + t.Class.Name)
600-
class, err := t.Client.StorageV1().StorageClasses().Create(context.TODO(), t.Class, metav1.CreateOptions{})
601-
framework.ExpectNoError(err)
602-
defer func() {
603-
err = storageutils.DeleteStorageClass(t.Client, class.Name)
604-
framework.ExpectNoError(err, "While deleting storage class")
605-
}()
606-
607599
ginkgo.By("creating claims")
608600
var claimNames []string
609601
var createdClaims []*v1.PersistentVolumeClaim

0 commit comments

Comments
 (0)