Skip to content

Commit 8c570b5

Browse files
committed
tests: detect missing backup in case of using "show" with "--backup-id" option
1 parent 5707a72 commit 8c570b5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/helpers/ptrack_helpers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,10 @@ def show_pb(
881881
return backup
882882
else:
883883
backup_list.append(backup)
884+
885+
if backup_id is not None:
886+
self.assertTrue(False, "Failed to find backup with ID: {0}".format(backup_id))
887+
884888
return backup_list
885889
else:
886890
show_splitted = self.run_pb(
@@ -935,6 +939,10 @@ def show_pb(
935939
var = var.strip('"')
936940
var = var.strip("'")
937941
specific_record[name.strip()] = var
942+
943+
if not specific_record:
944+
self.assertTrue(False, "Failed to find backup with ID: {0}".format(backup_id))
945+
938946
return specific_record
939947

940948
def validate_pb(

0 commit comments

Comments
 (0)