Skip to content

Commit 9191746

Browse files
committed
tests: minor fixes
1 parent d481c2e commit 9191746

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed

tests/expected/option_help.out

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
77

88
pg_probackup init -B backup-path
99

10-
pg_probackup set-config -B backup-dir --instance=instance_name
10+
pg_probackup set-config -B backup-path --instance=instance_name
1111
[--log-level-console=log-level-console]
1212
[--log-level-file=log-level-file]
1313
[--log-filename=log-filename]
@@ -23,8 +23,9 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
2323
[--master-db=db_name] [--master-host=host_name]
2424
[--master-port=port] [--master-user=user_name]
2525
[--replica-timeout=timeout]
26+
[--archive-timeout=timeout]
2627

27-
pg_probackup show-config -B backup-dir --instance=instance_name
28+
pg_probackup show-config -B backup-path --instance=instance_name
2829
[--format=format]
2930

3031
pg_probackup backup -B backup-path -b backup-mode --instance=instance_name
@@ -50,44 +51,46 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
5051
[--master-port=port] [--master-user=user_name]
5152
[--replica-timeout=timeout]
5253

53-
pg_probackup restore -B backup-dir --instance=instance_name
54-
[-D pgdata-dir] [-i backup-id] [--progress]
54+
pg_probackup restore -B backup-path --instance=instance_name
55+
[-D pgdata-path] [-i backup-id] [--progress]
5556
[--time=time|--xid=xid|--lsn=lsn [--inclusive=boolean]]
5657
[--timeline=timeline] [-T OLDDIR=NEWDIR]
5758
[--immediate] [--recovery-target-name=target-name]
5859
[--recovery-target-action=pause|promote|shutdown]
5960
[--restore-as-replica]
6061
[--no-validate]
6162

62-
pg_probackup validate -B backup-dir [--instance=instance_name]
63+
pg_probackup validate -B backup-path [--instance=instance_name]
6364
[-i backup-id] [--progress]
6465
[--time=time|--xid=xid|--lsn=lsn [--inclusive=boolean]]
6566
[--recovery-target-name=target-name]
6667
[--timeline=timeline]
6768

68-
pg_probackup show -B backup-dir
69+
pg_probackup show -B backup-path
6970
[--instance=instance_name [-i backup-id]]
7071
[--format=format]
7172

72-
pg_probackup delete -B backup-dir --instance=instance_name
73+
pg_probackup delete -B backup-path --instance=instance_name
7374
[--wal] [-i backup-id | --expired]
7475

75-
pg_probackup merge -B backup-dir --instance=instance_name
76+
pg_probackup merge -B backup-path --instance=instance_name
7677
-i backup-id
7778

78-
pg_probackup add-instance -B backup-dir -D pgdata-dir
79+
pg_probackup add-instance -B backup-path -D pgdata-path
7980
--instance=instance_name
8081

81-
pg_probackup del-instance -B backup-dir
82+
pg_probackup del-instance -B backup-path
8283
--instance=instance_name
8384

84-
pg_probackup archive-push -B backup-dir --instance=instance_name
85+
pg_probackup archive-push -B backup-path --instance=instance_name
8586
--wal-file-path=wal-file-path
8687
--wal-file-name=wal-file-name
87-
[--compress [--compress-level=compress-level]]
88+
[--compress]
89+
[--compress-algorithm=compress-algorithm]
90+
[--compress-level=compress-level]
8891
[--overwrite]
8992

90-
pg_probackup archive-get -B backup-dir --instance=instance_name
93+
pg_probackup archive-get -B backup-path --instance=instance_name
9194
--wal-file-path=wal-file-path
9295
--wal-file-name=wal-file-name
9396

tests/page.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def test_page_backup_with_alien_wal_segment(self):
919919
os.rename(file, file_destination)
920920

921921
if self.archive_compress:
922-
file = file[:-3]
922+
file_destination = file_destination[:-3]
923923

924924
# Single-thread PAGE backup
925925
try:
@@ -936,9 +936,8 @@ def test_page_backup_with_alien_wal_segment(self):
936936
'INFO: Wait for LSN' in e.message and
937937
'in archived WAL segment' in e.message and
938938
'could not read WAL record at' in e.message and
939-
'incorrect resource manager data checksum in record at' in e.message and
940939
'Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
941-
file) in e.message,
940+
file_destination) in e.message,
942941
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
943942
repr(e.message), self.cmd))
944943

@@ -962,9 +961,8 @@ def test_page_backup_with_alien_wal_segment(self):
962961
'INFO: Wait for LSN' in e.message and
963962
'in archived WAL segment' in e.message and
964963
'could not read WAL record at' in e.message and
965-
'incorrect resource manager data checksum in record at' in e.message and
966964
'Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
967-
file) in e.message,
965+
file_destination) in e.message,
968966
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
969967
repr(e.message), self.cmd))
970968

tests/show_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_show_1(self):
2828
self.assertEqual(
2929
self.backup_node(
3030
backup_dir, 'node', node,
31-
options=["--log-level-console=panic"]),
31+
options=["--log-level-console=off"]),
3232
None
3333
)
3434
self.assertIn("OK", self.show_pb(backup_dir, 'node', as_text=True))
@@ -56,7 +56,7 @@ def test_show_json(self):
5656
self.assertEqual(
5757
self.backup_node(
5858
backup_dir, 'node', node,
59-
options=["--log-level-console=panic"]),
59+
options=["--log-level-console=off"]),
6060
None
6161
)
6262
self.backup_node(backup_dir, 'node', node)

tests/validate_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ def test_pgpro561(self):
14941494
# result = node2.safe_psql("postgres", "select last_failed_wal from pg_stat_get_archiver() where last_failed_wal is not NULL")
14951495
## self.assertEqual(res, six.b(""), 'Restored Node1 failed to archive segment {0} due to having the same archive command as Master'.format(res.rstrip()))
14961496
# if result == "":
1497-
# self.assertEqual(1, 0, 'Error is expected due to Master and Node1 having the common archive and archive_command')
1497+
# self.assertEqual(1, 0, 'Error is expected due to Master and Node1 having the common archive and archive_command')
14981498

14991499
self.switch_wal_segment(node1)
15001500
self.switch_wal_segment(node2)

0 commit comments

Comments
 (0)