1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-03 14:01:57 +02:00

pgpro561 added

This commit is contained in:
Grigory Smolkin 2017-05-17 12:46:38 +03:00
parent 442cef1ca5
commit fa1ba6c531
20 changed files with 161 additions and 111 deletions

View File

@ -5,11 +5,12 @@ from . import init_test, option_test, show_test, \
retention_test, ptrack_clean, ptrack_cluster, \
ptrack_move_to_tablespace, ptrack_recovery, ptrack_vacuum, \
ptrack_vacuum_bits_frozen, ptrack_vacuum_bits_visibility, \
ptrack_vacuum_full, ptrack_vacuum_truncate, pgpro668
ptrack_vacuum_full, ptrack_vacuum_truncate, pgpro561, pgpro668
def load_tests(loader, tests, pattern):
suite = unittest.TestSuite()
suite.addTests(loader.loadTestsFromModule(pgpro561))
suite.addTests(loader.loadTestsFromModule(pgpro668))
suite.addTests(loader.loadTestsFromModule(init_test))
suite.addTests(loader.loadTestsFromModule(option_test))

View File

@ -17,7 +17,6 @@ class BackupTest(ProbackupTest, unittest.TestCase):
def test_backup_modes_archive(self):
"""standart backup modes with ARCHIVE WAL method"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/backup/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -74,7 +73,6 @@ class BackupTest(ProbackupTest, unittest.TestCase):
def test_smooth_checkpoint(self):
"""full backup with smooth checkpoint"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/backup/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -94,7 +92,6 @@ class BackupTest(ProbackupTest, unittest.TestCase):
def test_page_backup_without_full(self):
"""page-level backup without validated full backup"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/backup/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -115,7 +112,6 @@ class BackupTest(ProbackupTest, unittest.TestCase):
def test_ptrack_threads(self):
"""ptrack multi thread backup mode"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/backup/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -140,7 +136,6 @@ class BackupTest(ProbackupTest, unittest.TestCase):
def test_ptrack_threads_stream(self):
"""ptrack multi thread backup mode and stream"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/backup/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums'],

View File

@ -18,7 +18,6 @@ class DeleteTest(ProbackupTest, unittest.TestCase):
def test_delete_full_backups(self):
"""delete full backups"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/delete/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -60,7 +59,6 @@ class DeleteTest(ProbackupTest, unittest.TestCase):
def test_delete_increment(self):
"""delete increment and all after him"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/delete/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],

View File

@ -15,7 +15,6 @@ class InitTest(ProbackupTest, unittest.TestCase):
def test_success_1(self):
"""Success normal init"""
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/init/{0}".format(fname))
self.assertEqual(self.init_pb(node), six.b(""))
self.assertEqual(
@ -26,7 +25,6 @@ class InitTest(ProbackupTest, unittest.TestCase):
def test_already_exist_2(self):
"""Failure with backup catalog already existed"""
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/init/{0}".format(fname))
self.init_pb(node)
try:
@ -42,7 +40,6 @@ class InitTest(ProbackupTest, unittest.TestCase):
def test_abs_path_3(self):
"""failure with backup catalog should be given as absolute path"""
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/init/{0}".format(fname))
try:
self.run_pb(["init", "-B", path.relpath("%s/backup" % node.base_dir, self.dir_path)])

View File

@ -17,7 +17,6 @@ class OptionTest(ProbackupTest, unittest.TestCase):
def test_help_1(self):
"""help options"""
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
with open(path.join(self.dir_path, "expected/option_help.out"), "rb") as help_out:
self.assertEqual(
self.run_pb(["--help"]),
@ -27,7 +26,6 @@ class OptionTest(ProbackupTest, unittest.TestCase):
def test_version_2(self):
"""help options"""
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
with open(path.join(self.dir_path, "expected/option_version.out"), "rb") as version_out:
self.assertEqual(
self.run_pb(["--version"]),
@ -37,7 +35,6 @@ class OptionTest(ProbackupTest, unittest.TestCase):
def test_without_backup_path_3(self):
"""backup command failure without backup mode option"""
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
try:
self.run_pb(["backup", "-b", "full"])
# we should die here because exception is what we expect to happen
@ -51,7 +48,6 @@ class OptionTest(ProbackupTest, unittest.TestCase):
def test_options_4(self):
"""check options test"""
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/option/{0}".format(fname))
try:
node.stop()

67
tests/pgpro561.py Normal file
View File

@ -0,0 +1,67 @@
import unittest
import os
import six
from .ptrack_helpers import ProbackupTest, ProbackupException, idx_ptrack
from datetime import datetime, timedelta
from testgres import stop_all
import subprocess
from sys import exit
class SomeTest(ProbackupTest, unittest.TestCase):
def __init__(self, *args, **kwargs):
super(SomeTest, self).__init__(*args, **kwargs)
# @classmethod
# def tearDownClass(cls):
# stop_all()
def test_pgpro561(self):
"""
make node with archiving, make stream backup,
get Recovery Time, try to make pitr to Recovery Time
"""
fname = self.id().split('.')[3]
master = self.make_simple_node(base_dir="tmp_dirs/pgpro561/{0}/master".format(fname),
set_archiving=True,
set_replication=True,
initdb_params=['--data-checksums'],
pg_options={'wal_level': 'replica', 'max_wal_senders': '2'}
)
master.start()
node1 = self.make_simple_node(base_dir="tmp_dirs/pgpro561/{0}/node1".format(fname))
node2 = self.make_simple_node(base_dir="tmp_dirs/pgpro561/{0}/node2".format(fname))
node1.cleanup()
node2.cleanup()
self.assertEqual(self.init_pb(master), six.b(""))
self.backup_pb(master, backup_type='full')
master.psql(
"postgres",
"create table t_heap as select i as id, md5(i::text) as text, md5(repeat(i::text,10))::tsvector as tsvector from generate_series(0,256) i")
# for i in idx_ptrack:
# if idx_ptrack[i]['type'] == 'heap':
# continue
# master.psql("postgres", "create index {0} on {1} using {2}({3})".format(
# i, idx_ptrack[i]['relation'], idx_ptrack[i]['type'], idx_ptrack[i]['column']))
#before = master.execute("postgres", "SELECT * FROM t_heap")
id = self.backup_pb(master, backup_type='page')
self.restore_pb(backup_dir=self.backup_dir(master), data_dir=node1.data_dir)
node1.append_conf('postgresql.auto.conf', 'port = {0}'.format(node1.port))
self.restore_pb(backup_dir=self.backup_dir(master), data_dir=node2.data_dir)
node2.append_conf('postgresql.auto.conf', 'port = {0}'.format(node2.port))
node1.start({"-t": "600"})
node2.start({"-t": "600"})
timeline_node1 = node1.get_control_data()["Latest checkpoint's TimeLineID"]
timeline_node2 = node2.get_control_data()["Latest checkpoint's TimeLineID"]
self.assertEqual(timeline_node1, timeline_node2,
"Node1 and Node2 timelines are different.\nWhich means that Node2 applied wals archived by Master AND Node1.\nWhich means that Master and Node1 have common archive.\nTHIS IS BAD\nCheck archive directory in {0}".format(os.path.join(self.backup_dir(master), "wal")))
# node1.pgbench_init(scale=5)
# node2.pgbench_init(scale=5)

View File

@ -23,8 +23,7 @@ class SomeTest(ProbackupTest, unittest.TestCase):
get Recovery Time, try to make pitr to Recovery Time
"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/backup/{0}".format(fname),
node = self.make_simple_node(base_dir="tmp_dirs/pgpro668/{0}".format(fname),
set_archiving=True,
set_replication=True,
initdb_params=['--data-checksums'],
@ -50,8 +49,7 @@ class SomeTest(ProbackupTest, unittest.TestCase):
Should fail. Waiting PGPRO-688
"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/backup/{0}".format(fname),
node = self.make_simple_node(base_dir="tmp_dirs/pgpro668/{0}".format(fname),
set_archiving=True,
set_replication=True,
initdb_params=['--data-checksums'],
@ -84,8 +82,7 @@ class SomeTest(ProbackupTest, unittest.TestCase):
try to make pitr to Recovery Time, check that t_heap do not exists
"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/backup/{0}".format(fname),
node = self.make_simple_node(base_dir="tmp_dirs/pgpro668/{0}".format(fname),
set_archiving=True,
set_replication=True,
initdb_params=['--data-checksums'],

View File

@ -15,7 +15,6 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
# @unittest.skip("123")
def test_ptrack_cluster_btree(self):
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],
@ -71,10 +70,8 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
self.clean_pb(node)
node.stop()
@unittest.skip("123")
def test_ptrack_cluster_spgist(self):
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],
@ -130,10 +127,8 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
self.clean_pb(node)
node.stop()
@unittest.skip("123")
def test_ptrack_cluster_brin(self):
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],
@ -189,10 +184,8 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
self.clean_pb(node)
node.stop()
@unittest.skip("123")
def test_ptrack_cluster_gist(self):
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],
@ -248,10 +241,8 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
self.clean_pb(node)
node.stop()
@unittest.skip("123")
def test_ptrack_cluster_gin(self):
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],

View File

@ -152,29 +152,6 @@ class ProbackupTest(object):
def backup_dir(self, node):
return os.path.abspath("%s/backup" % node.base_dir)
# def make_bnode(self, base_dir=None, allows_streaming=False, options={}):
# real_base_dir = os.path.join(self.dir_path, base_dir)
# shutil.rmtree(real_base_dir, ignore_errors=True)
#
# node = get_new_node('test', base_dir=real_base_dir)
# node.init(allows_streaming=allows_streaming)
#
# if not allows_streaming:
# node.append_conf("postgresql.auto.conf", "wal_level = hot_standby")
# node.append_conf("postgresql.auto.conf", "archive_mode = on")
# node.append_conf(
# "postgresql.auto.conf",
# """archive_command = 'cp "%%p" "%s/%%f"'""" % os.path.abspath(self.arcwal_dir(node))
# )
#
# for key, value in six.iteritems(options):
# node.append_conf("postgresql.conf", "%s = %s" % (key, value))
#
# return node
# def print_started(self, fname):
# print
def make_simple_node(self, base_dir=None, set_replication=False,
set_archiving=False, initdb_params=[], pg_options={}):
real_base_dir = os.path.join(self.dir_path, base_dir)
@ -199,7 +176,6 @@ class ProbackupTest(object):
self.set_archiving_conf(node, self.arcwal_dir(node))
return node
def create_tblspace_in_node(self, node, tblspc_name, cfs=False):
res = node.execute(
"postgres", "select exists (select 1 from pg_tablespace where spcname = '{0}')".format(
@ -346,11 +322,16 @@ class ProbackupTest(object):
def clean_pb(self, node):
shutil.rmtree(self.backup_dir(node), ignore_errors=True)
def backup_pb(self, node, backup_type="full", options=[]):
def backup_pb(self, node=None, data_dir=None, backup_dir=None, backup_type="full", options=[]):
if data_dir is None:
data_dir = node.data_dir
if backup_dir is None:
backup_dir = self.backup_dir(node)
cmd_list = [
"backup",
"-D", node.data_dir,
"-B", self.backup_dir(node),
"-B", backup_dir,
"-D", data_dir,
"-p", "%i" % node.port,
"-d", "postgres"
]
@ -359,37 +340,20 @@ class ProbackupTest(object):
return self.run_pb(cmd_list + options)
def backup_pb_proc(self, node, backup_type="full",
stdout=None, stderr=None, options=[]):
cmd_list = [
self.probackup_path,
"backup",
"-D", node.data_dir,
"-B", self.backup_dir(node),
"-p", "%i" % (node.port),
"-d", "postgres"
]
if backup_type:
cmd_list += ["-b", backup_type]
def restore_pb(self, node=None, backup_dir=None, data_dir=None, id=None, options=[]):
if data_dir is None:
data_dir = node.data_dir
if backup_dir is None:
backup_dir = self.backup_dir(node)
proc = subprocess.Popen(
cmd_list + options,
stdout=stdout,
stderr=stderr
)
return proc
def restore_pb(self, node, id=None, options=[]):
cmd_list = [
"restore",
"-D", node.data_dir,
"-B", self.backup_dir(node)
"-B", backup_dir,
"-D", data_dir
]
if id:
cmd_list += ["-i", id]
# print(cmd_list)
return self.run_pb(cmd_list + options)
def show_pb(self, node, id=None, options=[], as_text=False):

View File

@ -17,7 +17,6 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
def test_ptrack_recovery(self):
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],

View File

@ -17,7 +17,6 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
def test_ptrack_recovery(self):
fname = self.id().split(".")[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],

View File

@ -15,7 +15,6 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
# @unittest.skip("123")
def test_ptrack_vacuum(self):
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir='tmp_dirs/ptrack/{0}'.format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],

View File

@ -14,8 +14,8 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
stop_all()
def test_ptrack_vacuum_bits_frozen(self):
print 'test_ptrack_vacuum_bits_frozen started'
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/test_ptrack_vacuum_bits_frozen",
fname = self.id().split('.')[3]
node = self.make_simple_node(base_dir='tmp_dirs/ptrack/{0}'.format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],
pg_options={'ptrack_enable': 'on', 'wal_level': 'replica', 'max_wal_senders': '2'})

View File

@ -14,8 +14,8 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
stop_all()
def test_ptrack_vacuum_bits_visibility(self):
print 'test_ptrack_vacuum_bits_visibility started'
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/test_ptrack_vacuum_bits_visibility",
fname = self.id().split('.')[3]
node = self.make_simple_node(base_dir='tmp_dirs/ptrack/{0}'.format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],
pg_options={'ptrack_enable': 'on', 'wal_level': 'replica', 'max_wal_senders': '2'})

View File

@ -14,8 +14,8 @@ class SimpleTest(ProbackupTest, unittest.TestCase):
stop_all()
def test_ptrack_vacuum_truncate(self):
print 'test_ptrack_vacuum_truncate started'
node = self.make_simple_node(base_dir="tmp_dirs/ptrack/test_ptrack_vacuum_truncate",
fname = self.id().split('.')[3]
node = self.make_simple_node(base_dir='tmp_dirs/ptrack/{0}'.format(fname),
set_replication=True,
initdb_params=['--data-checksums', '-A trust'],
pg_options={'ptrack_enable': 'on', 'wal_level': 'replica', 'max_wal_senders': '2'})

68
tests/replica.py Normal file
View File

@ -0,0 +1,68 @@
import unittest
import os
import six
from .ptrack_helpers import ProbackupTest, ProbackupException, idx_ptrack
from datetime import datetime, timedelta
from testgres import stop_all
import subprocess
from sys import exit
class ReplicaTest(ProbackupTest, unittest.TestCase):
def __init__(self, *args, **kwargs):
super(SomeTest, self).__init__(*args, **kwargs)
@classmethod
def tearDownClass(cls):
stop_all()
def test_make_simple_replica(self):
"""
make node with archiving, make stream backup,
get Recovery Time, try to make pitr to Recovery Time
"""
fname = self.id().split('.')[3]
master = self.make_simple_node(base_dir="tmp_dirs/pgpro561/{0}/master".format(fname),
set_archiving=True,
set_replication=True,
initdb_params=['--data-checksums'],
pg_options={'wal_level': 'replica', 'max_wal_senders': '2'}
)
master.start()
slave = self.make_simple_node(base_dir="tmp_dirs/pgpro561/{0}/replica".format(fname),
set_archiving=True,
set_replication=True,
initdb_params=['--data-checksums'],
pg_options={'wal_level': 'replica', 'max_wal_senders': '2'}
)
slave_port = slave.port
slave.cleanup()
self.assertEqual(self.init_pb(master), six.b(""))
self.backup_pb(master, backup_type='full')
master.psql(
"postgres",
"create table t_heap as select i as id, md5(i::text) as text, md5(repeat(i::text,10))::tsvector as tsvector from generate_series(0,256) i")
# for i in idx_ptrack:
# if idx_ptrack[i]['type'] == 'heap':
# continue
# master.psql("postgres", "create index {0} on {1} using {2}({3})".format(
# i, idx_ptrack[i]['relation'], idx_ptrack[i]['type'], idx_ptrack[i]['column']))
before = master.execute("postgres", "SELECT * FROM t_heap")
id = self.backup_pb(master, backup_type='page')
self.restore_pb(backup_dir=self.backup_dir(master), data_dir=slave.data_dir)
slave.append_conf('postgresql.auto.conf', 'port = {0}'.format(slave.port))
slave.append_conf('postgresql.auto.conf', 'hot_standby = on')
slave.append_conf('recovery.conf', "standby_mode = 'on'")
slave.append_conf('recovery.conf',
"primary_conninfo = 'user=gsmol port={0} sslmode=prefer sslcompression=1'".format(master.port))
slave.start({"-t": "600"})
after = slave.execute("postgres", "SELECT * FROM t_heap")
self.assertEqual(before, after)

View File

@ -22,7 +22,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_full_to_latest(self):
"""recovery to latest from full backup"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -61,7 +60,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_full_page_to_latest(self):
"""recovery to latest from full + page backups"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -101,7 +99,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_to_timeline(self):
"""recovery to target timeline"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -156,7 +153,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_to_time(self):
"""recovery to target timeline"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -195,7 +191,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_to_xid(self):
"""recovery to target xid"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -249,7 +244,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_full_ptrack(self):
"""recovery to latest from full + ptrack backups"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -297,7 +291,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_full_ptrack_ptrack(self):
"""recovery to latest from full + ptrack + ptrack backups"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -352,7 +345,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_full_ptrack_stream(self):
"""recovery in stream mode to latest from full + ptrack backups"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_replication=True,
initdb_params=['--data-checksums'],
@ -397,7 +389,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_full_ptrack_under_load(self):
"""recovery to latest from full + ptrack backups with loads when ptrack backup do"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
set_replication=True,
@ -456,7 +447,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_full_under_load_ptrack(self):
"""recovery to latest from full + page backups with loads when full backup do"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
set_replication=True,
@ -516,7 +506,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_to_xid_inclusive(self):
"""recovery with target inclusive false"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -575,7 +564,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_with_tablespace_mapping_1(self):
"""recovery using tablespace-mapping option"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -663,7 +651,6 @@ class RestoreTest(ProbackupTest, unittest.TestCase):
def test_restore_with_tablespace_mapping_2(self):
"""recovery using tablespace-mapping option and page backup"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/restore/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],

View File

@ -19,7 +19,6 @@ class RetentionTest(ProbackupTest, unittest.TestCase):
def test_retention_redundancy_1(self):
"""purge backups using redundancy-based retention policy"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/retention/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -65,7 +64,6 @@ class RetentionTest(ProbackupTest, unittest.TestCase):
def test_retention_window_2(self):
"""purge backups using window-based retention policy"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/retention/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],

View File

@ -18,7 +18,6 @@ class OptionTest(ProbackupTest, unittest.TestCase):
def show_test_1(self):
"""Status DONE and OK"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/show/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -37,7 +36,6 @@ class OptionTest(ProbackupTest, unittest.TestCase):
def test_corrupt_2(self):
"""Status CORRUPT"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/show/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],

View File

@ -24,7 +24,6 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
def test_validate_time(self):
"""recovery to latest from full backup"""
fname = self.id().split('.')[3]
print '\n {0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/validate/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -52,7 +51,6 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
def test_validate_wal_1(self):
"""recovery to latest from full backup"""
fname = self.id().split('.')[3]
print '\n {0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/validate/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -172,7 +170,6 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
def test_validate_wal_lost_segment_1(self):
"""Loose segment which belong to some backup"""
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/validate/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],
@ -209,7 +206,6 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
def test_validate_wal_lost_segment_2(self):
"""Loose segment located between backups """
fname = self.id().split('.')[3]
print '{0} started'.format(fname)
node = self.make_simple_node(base_dir="tmp_dirs/validate/{0}".format(fname),
set_archiving=True,
initdb_params=['--data-checksums'],