Skip to content

Commit

Permalink
PBM-1394: check if delete can be run during backup
Browse files Browse the repository at this point in the history
  • Loading branch information
defbin committed Sep 18, 2024
1 parent ca68fd7 commit 4e46784
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions e2e-tests/cmd/pbm-test/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func run(t *sharded.Cluster, typ testTyp) {

t.SetBallastData(1e5)

runTest("Check the Running Backup can't be deleted",
t.BackupNotDeleteRunning)
runTest("Check the Cannot Run Delete During Backup",
t.CannotRunDeleteDuringBackup)

runTest("Check Backup Cancellation",
func() { t.BackupCancellation(storage) })
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions e2e-tests/pkg/tests/sharded/test_delete_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@ func checkArtefacts(conf string, shouldStay map[string]struct{}) {
}
}

func (c *Cluster) BackupNotDeleteRunning() {
func (c *Cluster) CannotRunDeleteDuringBackup() {
bcpName := c.LogicalBackup()
c.printBcpList()
log.Println("deleting backup", bcpName)
o, err := c.pbm.RunCmd("pbm", "delete-backup", "-y", bcpName)
if err == nil || !strings.Contains(err.Error(), "backup is in progress") {
if err == nil || !strings.Contains(err.Error(), "another operation in progress, Snapshot backup") {
list, lerr := c.pbm.RunCmd("pbm", "list")
log.Fatalf("ERROR: running backup '%s' shouldn't be deleted.\n"+
"Output: %s\nStderr:%v\nBackups list:\n%v\n%v",
Expand Down

0 comments on commit 4e46784

Please sign in to comment.