-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add E2E test cases for backup VolumeInfo feature. #7396
Add E2E test cases for backup VolumeInfo feature. #7396
Conversation
2cd5d8a
to
6aa29ff
Compare
6aa29ff
to
354482c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7396 +/- ##
=======================================
Coverage 61.64% 61.64%
=======================================
Files 262 262
Lines 28480 28480
=======================================
Hits 17556 17556
Misses 9691 9691
Partials 1233 1233 ☔ View full report in Codecov by Sentry. |
8dee79a
to
40b9af8
Compare
E2E test passed on developing AWS, Azure, and GCP environments. Ready for review. |
f.BackupName, | ||
BackupObjectsPrefix+"/"+f.BackupName, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to print volume info file content for case improvement in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
if strings.Contains(v.VeleroCfg.Features, "EnableCSI") { | ||
if strings.Contains(v.CaseBaseName, "native-snapshot") { | ||
fmt.Printf("Skip native snapshot case %s when the CSI feature is enabled.\n", v.CaseBaseName) | ||
Skip("Skip due to vSphere CSI driver long time issue of Static provisioning") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skip reason is not right here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified.
BackupVolumeInfo{ | ||
SnapshotVolumes: true, | ||
TestCase: TestCase{ | ||
CaseBaseName: "csi-snapshot-volumeinfo", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test case should be skipped on vSphere pipeline since we're not going test Velero CSI plugin on vSphere cluster in near future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the check in the base test case.
test/util/providers/common.go
Outdated
@@ -189,3 +194,59 @@ func IsSnapshotExisted(cloudProvider, cloudCredentialsFile, bslBucket, bslConfig | |||
} | |||
return nil | |||
} | |||
|
|||
func GetVolumeInfoMetadataContent( | |||
cloudProvider, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use objectStoreProvider
as input when getting volumeinfo.json.gz from an object store, cloudProvider
might not same with objectStoreProvider
when having test on Kind or other local clusters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified.
c6f6901
to
3151ace
Compare
// No need to install the VSC for vsphere environment. | ||
if v.VeleroCfg.CloudProvider != "vsphere" { | ||
// Install VolumeSnapshotClass | ||
Expect(KubectlApplyByFile(v.Ctx, fmt.Sprintf("../testdata/volume-snapshot-class/%s.yaml", v.VeleroCfg.CloudProvider))).To(Succeed(), "Failed to install VolumeSnapshotClass") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VolumeSnapshotClass installation should be moved to Velero installation part, because other test cases with CSI snapshot test steps will also need VolumeSnapshotClass if it is not installed before E2E execution. This test case can not guarantee CSI plugin is passed to the E2E test, currently that depends on CI to pass CSI plugin and EnableCSI flag to E2E test, so we assume we can not have native-snapshot and CSI-snapshot in the same test execution, it's not as design for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified.
Signed-off-by: Xun Jiang <[email protected]>
Signed-off-by: Xun Jiang <[email protected]>
3151ace
to
ef5c2ed
Compare
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #7388
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.