Skip to content

Commit 4e46784

Browse files
committed
PBM-1394: check if delete can be run during backup
1 parent ca68fd7 commit 4e46784

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

e2e-tests/cmd/pbm-test/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ func run(t *sharded.Cluster, typ testTyp) {
7070

7171
t.SetBallastData(1e5)
7272

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

7676
runTest("Check Backup Cancellation",
7777
func() { t.BackupCancellation(storage) })

e2e-tests/docker/pbm-agent/Dockerfile

Whitespace-only changes.

e2e-tests/pkg/tests/sharded/test_delete_backup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,12 @@ func checkArtefacts(conf string, shouldStay map[string]struct{}) {
191191
}
192192
}
193193

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

0 commit comments

Comments
 (0)