mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-30 11:46:16 +00:00
Add E2E test cases for repository maintenance job configuration.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -41,6 +41,7 @@ depends on your test patterns.
|
||||
*/
|
||||
type VeleroBackupRestoreTest interface {
|
||||
Init() error
|
||||
InstallVelero() error
|
||||
CreateResources() error
|
||||
Backup() error
|
||||
Destroy() error
|
||||
@@ -109,6 +110,10 @@ func (t *TestCase) GenerateUUID() string {
|
||||
return fmt.Sprintf("%08d", rand.IntN(100000000))
|
||||
}
|
||||
|
||||
func (t *TestCase) InstallVelero() error {
|
||||
return PrepareVelero(context.Background(), t.GetTestCase().CaseBaseName, t.GetTestCase().VeleroCfg)
|
||||
}
|
||||
|
||||
func (t *TestCase) CreateResources() error {
|
||||
return nil
|
||||
}
|
||||
@@ -221,7 +226,8 @@ func RunTestCase(test VeleroBackupRestoreTest) error {
|
||||
fmt.Printf("Running test case %s %s\n", test.GetTestMsg().Desc, time.Now().Format("2006-01-02 15:04:05"))
|
||||
|
||||
if InstallVelero {
|
||||
Expect(PrepareVelero(context.Background(), test.GetTestCase().CaseBaseName, test.GetTestCase().VeleroCfg)).To(Succeed())
|
||||
fmt.Printf("Install Velero for test case %s: %s", test.GetTestCase().CaseBaseName, time.Now().Format("2006-01-02 15:04:05"))
|
||||
Expect(test.InstallVelero()).To(Succeed())
|
||||
}
|
||||
|
||||
defer test.Clean()
|
||||
|
||||
Reference in New Issue
Block a user