1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-03-17 21:18:00 +02:00

tests: minor fixes

This commit is contained in:
Grigory Smolkin 2018-09-06 20:46:32 +03:00
parent d481c2e919
commit 9191746ce0
4 changed files with 22 additions and 21 deletions

View File

@ -7,7 +7,7 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
pg_probackup init -B backup-path
pg_probackup set-config -B backup-dir --instance=instance_name
pg_probackup set-config -B backup-path --instance=instance_name
[--log-level-console=log-level-console]
[--log-level-file=log-level-file]
[--log-filename=log-filename]
@ -23,8 +23,9 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
[--master-db=db_name] [--master-host=host_name]
[--master-port=port] [--master-user=user_name]
[--replica-timeout=timeout]
[--archive-timeout=timeout]
pg_probackup show-config -B backup-dir --instance=instance_name
pg_probackup show-config -B backup-path --instance=instance_name
[--format=format]
pg_probackup backup -B backup-path -b backup-mode --instance=instance_name
@ -50,8 +51,8 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
[--master-port=port] [--master-user=user_name]
[--replica-timeout=timeout]
pg_probackup restore -B backup-dir --instance=instance_name
[-D pgdata-dir] [-i backup-id] [--progress]
pg_probackup restore -B backup-path --instance=instance_name
[-D pgdata-path] [-i backup-id] [--progress]
[--time=time|--xid=xid|--lsn=lsn [--inclusive=boolean]]
[--timeline=timeline] [-T OLDDIR=NEWDIR]
[--immediate] [--recovery-target-name=target-name]
@ -59,35 +60,37 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
[--restore-as-replica]
[--no-validate]
pg_probackup validate -B backup-dir [--instance=instance_name]
pg_probackup validate -B backup-path [--instance=instance_name]
[-i backup-id] [--progress]
[--time=time|--xid=xid|--lsn=lsn [--inclusive=boolean]]
[--recovery-target-name=target-name]
[--timeline=timeline]
pg_probackup show -B backup-dir
pg_probackup show -B backup-path
[--instance=instance_name [-i backup-id]]
[--format=format]
pg_probackup delete -B backup-dir --instance=instance_name
pg_probackup delete -B backup-path --instance=instance_name
[--wal] [-i backup-id | --expired]
pg_probackup merge -B backup-dir --instance=instance_name
pg_probackup merge -B backup-path --instance=instance_name
-i backup-id
pg_probackup add-instance -B backup-dir -D pgdata-dir
pg_probackup add-instance -B backup-path -D pgdata-path
--instance=instance_name
pg_probackup del-instance -B backup-dir
pg_probackup del-instance -B backup-path
--instance=instance_name
pg_probackup archive-push -B backup-dir --instance=instance_name
pg_probackup archive-push -B backup-path --instance=instance_name
--wal-file-path=wal-file-path
--wal-file-name=wal-file-name
[--compress [--compress-level=compress-level]]
[--compress]
[--compress-algorithm=compress-algorithm]
[--compress-level=compress-level]
[--overwrite]
pg_probackup archive-get -B backup-dir --instance=instance_name
pg_probackup archive-get -B backup-path --instance=instance_name
--wal-file-path=wal-file-path
--wal-file-name=wal-file-name

View File

@ -919,7 +919,7 @@ class PageBackupTest(ProbackupTest, unittest.TestCase):
os.rename(file, file_destination)
if self.archive_compress:
file = file[:-3]
file_destination = file_destination[:-3]
# Single-thread PAGE backup
try:
@ -936,9 +936,8 @@ class PageBackupTest(ProbackupTest, unittest.TestCase):
'INFO: Wait for LSN' in e.message and
'in archived WAL segment' in e.message and
'could not read WAL record at' in e.message and
'incorrect resource manager data checksum in record at' in e.message and
'Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
file) in e.message,
file_destination) in e.message,
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
repr(e.message), self.cmd))
@ -962,9 +961,8 @@ class PageBackupTest(ProbackupTest, unittest.TestCase):
'INFO: Wait for LSN' in e.message and
'in archived WAL segment' in e.message and
'could not read WAL record at' in e.message and
'incorrect resource manager data checksum in record at' in e.message and
'Possible WAL corruption. Error has occured during reading WAL segment "{0}"'.format(
file) in e.message,
file_destination) in e.message,
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(
repr(e.message), self.cmd))

View File

@ -28,7 +28,7 @@ class OptionTest(ProbackupTest, unittest.TestCase):
self.assertEqual(
self.backup_node(
backup_dir, 'node', node,
options=["--log-level-console=panic"]),
options=["--log-level-console=off"]),
None
)
self.assertIn("OK", self.show_pb(backup_dir, 'node', as_text=True))
@ -56,7 +56,7 @@ class OptionTest(ProbackupTest, unittest.TestCase):
self.assertEqual(
self.backup_node(
backup_dir, 'node', node,
options=["--log-level-console=panic"]),
options=["--log-level-console=off"]),
None
)
self.backup_node(backup_dir, 'node', node)

View File

@ -1494,7 +1494,7 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
# result = node2.safe_psql("postgres", "select last_failed_wal from pg_stat_get_archiver() where last_failed_wal is not NULL")
## self.assertEqual(res, six.b(""), 'Restored Node1 failed to archive segment {0} due to having the same archive command as Master'.format(res.rstrip()))
# if result == "":
# self.assertEqual(1, 0, 'Error is expected due to Master and Node1 having the common archive and archive_command')
# self.assertEqual(1, 0, 'Error is expected due to Master and Node1 having the common archive and archive_command')
self.switch_wal_segment(node1)
self.switch_wal_segment(node2)