Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a341bf

Browse files
committed
Test if backup_prefix is set
1 parent 52fc537 commit 7a341bf

File tree

1 file changed

+1
-1
lines changed
  • testgres/plugins/pg_probackup2/pg_probackup2/storage

1 file changed

+1
-1
lines changed

testgres/plugins/pg_probackup2/pg_probackup2/storage/fs_backup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class FSTestBackupDir(TestBackupDir):
4444

4545
def __init__(self, *, rel_path, backup):
4646
backup_prefix = os.environ.get('PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX')
47-
if not os.path.isabs(backup_prefix):
47+
if backup_prefix and not os.path.isabs(backup_prefix):
4848
raise Exception(f"PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX must be an absolute path, current value: {backup_prefix}")
4949
self.path = os.path.join(backup_prefix or init_params.tmp_path, rel_path, backup)
5050
self.pb_args = ('-B', self.path)

0 commit comments

Comments
 (0)