-
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 backup deletion e2e test #4401
Add backup deletion e2e test #4401
Conversation
015e721
to
f8be092
Compare
01a0f15
to
62ad0ba
Compare
6bada56
to
f465ae1
Compare
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.
Some detail maybe should be modified.
if serr, ok := err.(azblob.StorageError); ok { // This error is a Service-specific | ||
switch serr.ServiceCode() { // Compare serviceCode to ServiceCodeXxx constants | ||
case azblob.ServiceCodeContainerAlreadyExists: | ||
//fmt.Println("Received 409. Container already exists") |
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 be removed or print it
b30eaaa
to
d07c689
Compare
test/e2e/backup-resource/deletion.go
Outdated
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package backupresource |
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.
There is already a package called backup
here, so what's different between the backup
and backupresource
? It's confusing.
test/e2e/backup-resource/deletion.go
Outdated
return err | ||
} | ||
backupName = "backup-1-" + UUIDgen.String() | ||
if err := VeleroBackupNamespace(oneHourTimeout, veleroCLI, veleroNamespace, backupName, deletionTest, backupLocation, useVolumeSnapshots); err != nil { |
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.
Why do we need to backup again?
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.
Because the 1st backup was deleted locally for verification that backup can be deleted from object store right after local deletion.
test/e2e/backup-resource/deletion.go
Outdated
func Backup_deletion_with_restic() { | ||
backup_deletion_test(false) | ||
} | ||
func backup_deletion_test(useVolumeSnapshots bool) { |
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.
Does this case check the snapshots or restic data? If it doesn't, why we need to back up the volumes?
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.
Snapshot verification will be provide in a new PR. Way of verifying Restic repo changes is under investigation.
test/e2e/backup-resource/deletion.go
Outdated
}) | ||
|
||
When("kibishii is the sample workload", func() { | ||
It("should be successfully backed up and restored to the default BackupStorageLocation", func() { |
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.
Correct the case description?
test/e2e/e2e_suite_test.go
Outdated
@@ -76,6 +77,8 @@ var _ = Describe("[Upgrade][Restic] Velero upgrade tests on cluster using the pl | |||
|
|||
var _ = Describe("[Upgrade][Snapshot] Velero upgrade tests on cluster using the plugin provider for object storage and snapshots for volume backups", BackupUpgradeRestoreWithSnapshots) | |||
|
|||
var _ = Describe("[backup-resource][deletion][restic] Velero tests on cluster using the plugin provider for object storage and Restic for volume backups", Backup_deletion_with_restic) |
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.
Correct the case description
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.
Changing [backup-resource][deletion]
to [backup-deletion]
is more reasonable?
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.
There will be more tests under backup-resource, the resource does not mean as k8s resources, it is the resource caused by backup action, it's the object of velero.
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 we use unified naming conventions like [BackupResource][Deletion][Restic]?
e0c0105
to
4e2df0a
Compare
c409c81
to
6a24e03
Compare
2447128
to
7561e17
Compare
efe809c
to
9f898df
Compare
Test case description is "Deleted backups are deleted from object storage and backups deleted from object storage can be deleted locally", in this test, only resource backup objects are target for verifition, restic repo verification is not included in this PR, and snapshot verification will be in later PR Signed-off-by: danfengl <danfengl@vmware.com>
9f898df
to
29b2cd1
Compare
Fixed issue : #4348
Signed-off-by: danfengl danfengl@vmware.com
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #(issue)
Please indicate you've done the following:
/kind changelog-not-required
.site/content/docs/main
.