Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Utku Ozdemir <[email protected]>
  • Loading branch information
utkuozdemir committed Sep 25, 2023
1 parent 8467b78 commit c7966d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,12 @@ func createPod(ctx context.Context, cli *k8s.ClusterClient, namespace string, na
}

func createPVC(ctx context.Context, cli *k8s.ClusterClient, namespace string, name string) error {
var storageClassRef *string

storageClass := os.Getenv("PVMIG_TEST_STORAGE_CLASS")
if storageClass != "" {
storageClassRef = &storageClass
}

pvc := corev1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -755,7 +760,7 @@ func createPVC(ctx context.Context, cli *k8s.ClusterClient, namespace string, na
Labels: resourceLabels,
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: &storageClass,
StorageClassName: storageClassRef,
AccessModes: []corev1.PersistentVolumeAccessMode{
corev1.ReadWriteOnce,
},
Expand Down

0 comments on commit c7966d4

Please sign in to comment.