1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-24 08:52:38 +02:00

minor fixes

This commit is contained in:
Grigory Smolkin 2017-05-17 14:01:57 +03:00
parent fa1ba6c531
commit 8972d4f45b
8 changed files with 18 additions and 78 deletions

View File

@ -1,24 +0,0 @@
class Base(object):
def __init__(self):
self.a = 10
def func(self, arg1, arg2):
print 'Child {0}, a = {1}'.format(arg1, arg2)
class ChildA(Base):
def __init__(self):
Base.__init__(self)
b = 5
c = b + self.a
print 'Child A, a = {0}'.format(c)
class ChildB(Base):
def __init__(self):
super(ChildB, self).__init__()
b = 6
c = b + self.a
self.func('B', c)
#ChildA()
ChildB()

View File

@ -1,15 +0,0 @@
class Foo(object):
def __init__(self, *value1, **value2):
# do something with the values
print 'I think something is being called here'
# print value1, value2
class MyFoo(Foo):
def __init__(self, *args, **kwargs):
# do something else, don't care about the args
print args, kwargs
super(MyFoo, self).__init__(*args, **kwargs)
foo = MyFoo('Python', 2.7, stack='overflow', ololo='lalala')

View File

@ -1,23 +0,0 @@
class Base(object):
def __init__(self):
self.a = 10
self.b = 1
# def func(self, arg1, arg2):
# print 'Child {0}, a = {1}'.format(arg1, arg2)
class ChildA(Base):
def __init__(self):
Base.__init__(self)
self.b = self.b + 1
class ChildB(ChildA):
def __init__(self):
ChildA.__init__(self)
print 'b = {0}'.format(self.b)
# c = b + self.a
#ChildA()
ChildB()

View File

@ -1,7 +1,7 @@
pg_probackup - utility to manage backup/recovery of PostgreSQL database.
pg_probackup help
pg_probackup help [COMMAND]
pg_probackup version
@ -21,20 +21,20 @@ pg_probackup - utility to manage backup/recovery of PostgreSQL database.
[-d dbname] [-h host] [-p port] [-U username]
pg_probackup restore -B backup-dir
[-D pgdata-dir] [-i backup-id]
[-D pgdata-dir] [-i backup-id] [--progress] [-q] [-v]
[--time=time|--xid=xid [--inclusive=boolean]]
[--timeline=timeline] [-T OLDDIR=NEWDIR]
pg_probackup validate -B backup-dir
[-D pgdata-dir] [-i backup-id]
[-D pgdata-dir] [-i backup-id] [--progress] [-q] [-v]
[--time=time|--xid=xid [--inclusive=boolean]]
[--timeline=timeline] [-T OLDDIR=NEWDIR]
[--timeline=timeline]
pg_probackup show -B backup-dir
[-i backup-id]
pg_probackup delete -B backup-dir
[--wal] [-i backup-id | --expired] [--force]
[--wal] [-i backup-id | --expired]
Read the website for details. <https://github.com/postgrespro/pg_probackup>
Report bugs to <https://github.com/postgrespro/pg_probackup/issues>.

View File

@ -8,10 +8,10 @@ import subprocess
from sys import exit
class SomeTest(ProbackupTest, unittest.TestCase):
class CommonArchiveDir(ProbackupTest, unittest.TestCase):
def __init__(self, *args, **kwargs):
super(SomeTest, self).__init__(*args, **kwargs)
super(CommonArchiveDir, self).__init__(*args, **kwargs)
# @classmethod
# def tearDownClass(cls):
@ -19,8 +19,9 @@ class SomeTest(ProbackupTest, unittest.TestCase):
def test_pgpro561(self):
"""
make node with archiving, make stream backup,
get Recovery Time, try to make pitr to Recovery Time
make node with archiving, make backup,
restore it to node1 and node2, compare timelines
EXPECT TO FAIL
"""
fname = self.id().split('.')[3]
master = self.make_simple_node(base_dir="tmp_dirs/pgpro561/{0}/master".format(fname),

View File

@ -8,10 +8,10 @@ import subprocess
from sys import exit
class SomeTest(ProbackupTest, unittest.TestCase):
class RecoveryWithTimeTarget(ProbackupTest, unittest.TestCase):
def __init__(self, *args, **kwargs):
super(SomeTest, self).__init__(*args, **kwargs)
super(RecoveryWithTimeTarget, self).__init__(*args, **kwargs)
# @classmethod
# def tearDownClass(cls):
@ -46,7 +46,8 @@ class SomeTest(ProbackupTest, unittest.TestCase):
"""
make node with archiving, make stream backup,
get Recovery Time, validate to Recovery Time
Should fail. Waiting PGPRO-688
EXPECT VALIDATE TO FAIL
Waiting PGPRO-688
"""
fname = self.id().split('.')[3]
node = self.make_simple_node(base_dir="tmp_dirs/pgpro668/{0}".format(fname),

View File

@ -294,7 +294,7 @@ class ProbackupTest(object):
def run_pb(self, command):
try:
print [self.probackup_path] + command
# print [self.probackup_path] + command
output = subprocess.check_output(
[self.probackup_path] + command,
stderr=subprocess.STDOUT,

View File

@ -22,7 +22,7 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
# @unittest.skip("123")
def test_validate_time(self):
"""recovery to latest from full backup"""
"""recovery to latest from full backup. Expect to Fail"""
fname = self.id().split('.')[3]
node = self.make_simple_node(base_dir="tmp_dirs/validate/{0}".format(fname),
set_archiving=True,
@ -204,7 +204,7 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
# @unittest.skip("123")
def test_validate_wal_lost_segment_2(self):
"""Loose segment located between backups """
"""Loose segment located between backups. Expect to fail """
fname = self.id().split('.')[3]
node = self.make_simple_node(base_dir="tmp_dirs/validate/{0}".format(fname),
set_archiving=True,
@ -235,7 +235,7 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
wals = map(int, wals)
# delete last wal segment
print os.path.join(self.backup_dir(node), "wal", '0000000' + str(max(wals)))
#print os.path.join(self.backup_dir(node), "wal", '0000000' + str(max(wals)))
os.remove(os.path.join(self.backup_dir(node), "wal", '0000000' + str(max(wals))))
# Need more accurate error message about loosing wal segment between backups