@@ -25,17 +25,15 @@ import (
25
25
26
26
type VerificationFunction func (client.Client , string ) error
27
27
28
- type appVerificationFunction func (bool , BackupRestoreType ) VerificationFunction
29
-
30
- func dataMoverReady (preBackupState bool , appVerificationFunction appVerificationFunction ) VerificationFunction {
28
+ func dataMoverReady (veriFunc VerificationFunction ) VerificationFunction {
31
29
return VerificationFunction (func (ocClient client.Client , appNamespace string ) error {
32
30
// check volsync subscription exists
33
31
Eventually (InstalledSubscriptionCSV (ocClient , "openshift-operators" , "volsync-product" ), timeoutMultiplier * time .Minute * 10 , time .Second * 10 ).ShouldNot (Equal ("" ))
34
32
// check volsync controller is ready
35
33
fmt .Printf ("waiting for volsync controller readiness" )
36
34
Eventually (IsDeploymentReady (ocClient , common .VolSyncDeploymentNamespace , common .VolSyncDeploymentName ), timeoutMultiplier * time .Minute * 10 , time .Second * 10 ).Should (BeTrue ())
37
35
Eventually (IsDeploymentReady (ocClient , namespace , common .DataMover ), timeoutMultiplier * time .Minute * 10 , time .Second * 10 ).Should (BeTrue ())
38
- return appVerificationFunction ( preBackupState , CSIDataMover ) (ocClient , appNamespace )
36
+ return veriFunc (ocClient , appNamespace )
39
37
})
40
38
}
41
39
@@ -353,7 +351,7 @@ var _ = Describe("AWS backup restore tests", func() {
353
351
PostRestoreVerify : mongoready (false , CSI ),
354
352
}, nil ),
355
353
Entry ("MySQL application two Vol CSI" , Label ("ibmcloud" , "aws" , "gcp" , "azure" ), BackupRestoreCase {
356
- ApplicationTemplate : fmt . Sprintf ( "./sample-applications/mysql-persistent/mysql-persistent-twovol-csi.yaml" ) ,
354
+ ApplicationTemplate : "./sample-applications/mysql-persistent/mysql-persistent-twovol-csi.yaml" ,
357
355
ApplicationNamespace : "mysql-persistent" ,
358
356
Name : "mysql-twovol-csi-e2e" ,
359
357
BackupRestoreType : CSI ,
@@ -381,17 +379,17 @@ var _ = Describe("AWS backup restore tests", func() {
381
379
ApplicationNamespace : "mongo-persistent" ,
382
380
Name : "mongo-datamover-e2e" ,
383
381
BackupRestoreType : CSIDataMover ,
384
- PreBackupVerify : dataMoverReady (true , mongoready ),
385
- PostRestoreVerify : dataMoverReady (false , mongoready ),
382
+ PreBackupVerify : dataMoverReady (mongoready ( true , CSIDataMover ) ),
383
+ PostRestoreVerify : dataMoverReady (mongoready ( false , CSIDataMover ) ),
386
384
}, nil ),
387
385
// TODO: fix this test
388
386
Entry ("MySQL application DATAMOVER" , BackupRestoreCase {
389
- ApplicationTemplate : "./sample-applications/mysql-persistent/mysql-persistent-csi.yaml" ,
387
+ ApplicationTemplate : "./sample-applications/mysql-persistent/mysql-persistent-twovol- csi.yaml" ,
390
388
ApplicationNamespace : "mysql-persistent" ,
391
- Name : "mysql-datamover-e2e" ,
389
+ Name : "mysql-twovol- datamover-e2e" ,
392
390
BackupRestoreType : CSIDataMover ,
393
- PreBackupVerify : dataMoverReady (true , mysqlReady ),
394
- PostRestoreVerify : dataMoverReady (false , mysqlReady ),
391
+ PreBackupVerify : dataMoverReady (mysqlReady ( true , true , CSIDataMover ) ),
392
+ PostRestoreVerify : dataMoverReady (mysqlReady ( false , true , CSIDataMover ) ),
395
393
}, nil ),
396
394
)
397
395
})
0 commit comments