Skip to content

Commit

Permalink
test/e2e: multik8s: use CreatePVC instead of ApplyPVCTemplate
Browse files Browse the repository at this point in the history
Signed-off-by: Ryotaro Banno <[email protected]>
  • Loading branch information
ushitora-anqou committed Jan 20, 2025
1 parent 2220184 commit 11ec828
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions test/e2e/multik8s/changetoprimary/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ func changePrimaryToStandaloneTemporarily() {
pvcName1 = util.GetUniqueName("pvc-")
backupName10 = util.GetUniqueName("mb-")

Eventually(func() error {
return ApplyPVCTemplate(PrimaryK8sCluster, namespace, pvcName1)
}).Should(Succeed())
CreatePVC(ctx, PrimaryK8sCluster, namespace, pvcName1)
writtenDataHash10 = WriteRandomDataToPV(ctx, PrimaryK8sCluster, namespace, pvcName1)
CreateMantleBackup(PrimaryK8sCluster, namespace, pvcName1, backupName10)
})
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/multik8s/testutil/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func ApplyMantleRestoreTemplate(clusterNo int, namespace, restoreName, backupNam
return nil
}

func ApplyPVCTemplate(clusterNo int, namespace, name string) error {
func applyPVCTemplate(clusterNo int, namespace, name string) error {
manifest := fmt.Sprintf(testPVCTemplate, name)
_, _, err := Kubectl(clusterNo, []byte(manifest), "apply", "-n", namespace, "-f", "-")
if err != nil {
Expand Down Expand Up @@ -412,7 +412,7 @@ func SetupEnvironment(namespace string) {

func CreatePVC(ctx context.Context, cluster int, namespace, name string) {
Eventually(ctx, func() error {
return ApplyPVCTemplate(cluster, namespace, name)
return applyPVCTemplate(cluster, namespace, name)
}).Should(Succeed())
}

Expand Down

0 comments on commit 11ec828

Please sign in to comment.