mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 22:05:25 +00:00
Support Windows E2E.
* Please notice only Kibishii workload support Windows test, because the other work loads use busybox image, and not support Windows. * Refactor CreateFileToPod to support Windows. * Add skip logic for migration test if the version is under 1.16. * Add main in semver check. Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -138,8 +138,16 @@ func (v *BackupVolumeInfo) CreateResources() error {
|
||||
// Hitting issue https://github.com/vmware-tanzu/velero/issues/7388
|
||||
// So populate data only to some of pods, leave other pods empty to verify empty PV datamover
|
||||
if i%2 == 0 {
|
||||
Expect(CreateFileToPod(v.Ctx, createNSName, pod.Name, DefaultContainerName, vols[i].Name,
|
||||
fmt.Sprintf("file-%s", pod.Name), CreateFileContent(createNSName, pod.Name, vols[i].Name))).To(Succeed())
|
||||
Expect(CreateFileToPod(
|
||||
v.Ctx,
|
||||
createNSName,
|
||||
pod.Name,
|
||||
DefaultContainerName,
|
||||
vols[i].Name,
|
||||
fmt.Sprintf("file-%s", pod.Name),
|
||||
CreateFileContent(createNSName, pod.Name, vols[i].Name),
|
||||
WorkerOSLinux,
|
||||
)).To(Succeed())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ func (n *NamespaceMapping) CreateResources() error {
|
||||
n.VeleroCfg.KibishiiDirectory,
|
||||
n.kibishiiData,
|
||||
n.VeleroCfg.ImageRegistryProxy,
|
||||
n.VeleroCfg.WorkerOS,
|
||||
)).To(Succeed())
|
||||
})
|
||||
}
|
||||
@@ -111,8 +112,14 @@ func (n *NamespaceMapping) Verify() error {
|
||||
for index, ns := range n.MappedNamespaceList {
|
||||
n.kibishiiData.Levels = len(*n.NSIncluded) + index
|
||||
By(fmt.Sprintf("Verify workload %s after restore ", ns), func() {
|
||||
Expect(KibishiiVerifyAfterRestore(n.Client, ns,
|
||||
n.Ctx, n.kibishiiData, "")).To(Succeed(), "Fail to verify workload after restore")
|
||||
Expect(KibishiiVerifyAfterRestore(
|
||||
n.Client,
|
||||
ns,
|
||||
n.Ctx,
|
||||
n.kibishiiData,
|
||||
"",
|
||||
n.VeleroCfg.WorkerOS,
|
||||
)).To(Succeed(), "Fail to verify workload after restore")
|
||||
})
|
||||
}
|
||||
for _, ns := range *n.NSIncluded {
|
||||
|
||||
@@ -31,7 +31,7 @@ import (
|
||||
|
||||
type MultiNSBackup struct {
|
||||
TestCase
|
||||
IsScalTest bool
|
||||
IsScaleTest bool
|
||||
NSExcluded *[]string
|
||||
TimeoutDuration time.Duration
|
||||
}
|
||||
@@ -43,7 +43,7 @@ func (m *MultiNSBackup) Init() error {
|
||||
m.RestoreName = "restore-" + m.CaseBaseName
|
||||
m.NSExcluded = &[]string{}
|
||||
|
||||
if m.IsScalTest {
|
||||
if m.IsScaleTest {
|
||||
m.NamespacesTotal = 2500
|
||||
m.TimeoutDuration = time.Hour * 2
|
||||
m.TestMsg = &TestMSG{
|
||||
|
||||
@@ -39,7 +39,7 @@ import (
|
||||
func GetResourcesCheckTestCases() []VeleroBackupRestoreTest {
|
||||
return []VeleroBackupRestoreTest{
|
||||
&NSAnnotationCase{},
|
||||
&MultiNSBackup{IsScalTest: false},
|
||||
&MultiNSBackup{IsScaleTest: false},
|
||||
&RBACCase{},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user