Skip to content

Commit

Permalink
vsan stretch with CSI snapshot testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
Aishwarya-Hebbar committed Sep 16, 2024
1 parent 3196039 commit 285d7ae
Show file tree
Hide file tree
Showing 4 changed files with 1,544 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -7026,3 +7026,29 @@ func removeStoragePolicyQuota(ctx context.Context, restClientConfig *rest.Config
framework.Logf("Quota after removing: %s", spq.Spec.Limit)

}

func createMultipleDeployments(ctx context.Context, client clientset.Interface, namespace string,
depCount int, pvcList []*v1.PersistentVolumeClaim) []*appsv1.Deployment {

framework.Logf("Creating Deployment")
var deploymentList []*appsv1.Deployment
for i := 0; i < depCount; i++ {
labelsMap := make(map[string]string)
labelsMap["app"] = "test"
deployment, err := createDeployment(
ctx, client, 1, labelsMap, nil, namespace, []*v1.PersistentVolumeClaim{pvcList[i]}, "", false, busyBoxImageOnGcr)
gomega.Expect(err).NotTo(gomega.HaveOccurred())

deployment, err = client.AppsV1().Deployments(namespace).Get(ctx, deployment.Name, metav1.GetOptions{})
gomega.Expect(err).NotTo(gomega.HaveOccurred())

pods, err := fdep.GetPodsForDeployment(ctx, client, deployment)
gomega.Expect(err).NotTo(gomega.HaveOccurred())
pod := pods.Items[0]
err = fpod.WaitForPodNameRunningInNamespace(ctx, client, pod.Name, namespace)
gomega.Expect(err).NotTo(gomega.HaveOccurred())
deploymentList = append(deploymentList, deployment)

}
return deploymentList
}
Loading

0 comments on commit 285d7ae

Please sign in to comment.