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

[PBCKP-304] missed self.module_name & self.fname fixes

This commit is contained in:
Ivan Lazarev 2022-11-15 17:56:40 +03:00
parent 9924ab0142
commit e3189e425d
7 changed files with 7 additions and 19 deletions

View File

@ -6,13 +6,8 @@ import shutil
from .helpers.cfs_helpers import find_by_extensions, find_by_name, find_by_pattern, corrupt_file
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException
module_name = 'cfs_catchup'
tblspace_name = 'cfs_tblspace'
class CfsCatchupNoEncTest(ProbackupTest, unittest.TestCase):
def setUp(self):
self.fname = self.id().split('.')[3]
@unittest.skipUnless(ProbackupTest.enterprise, 'skip')
def test_full_catchup_with_tablespace(self):
@ -21,7 +16,7 @@ class CfsCatchupNoEncTest(ProbackupTest, unittest.TestCase):
"""
# preparation
src_pg = self.make_simple_node(
base_dir = os.path.join(module_name, self.fname, 'src'),
base_dir = os.path.join(self.module_name, self.fname, 'src'),
set_replication = True
)
src_pg.slow_start()
@ -36,7 +31,7 @@ class CfsCatchupNoEncTest(ProbackupTest, unittest.TestCase):
"CHECKPOINT")
# do full catchup with tablespace mapping
dst_pg = self.make_empty_node(os.path.join(module_name, self.fname, 'dst'))
dst_pg = self.make_empty_node(os.path.join(self.module_name, self.fname, 'dst'))
tblspace1_new_path = self.get_tblspace_path(dst_pg, 'tblspace1_new')
self.catchup_node(
backup_mode = 'FULL',
@ -120,8 +115,3 @@ class CfsCatchupNoEncTest(ProbackupTest, unittest.TestCase):
src_query_result = src_pg.safe_psql("postgres", "SELECT * FROM ultimate_question")
dst_query_result = dst_pg.safe_psql("postgres", "SELECT * FROM ultimate_question")
self.assertEqual(src_query_result, dst_query_result, 'Different answer from copy')
# Cleanup
src_pg.stop()
dst_pg.stop()
self.del_test_dir(module_name, self.fname)

View File

@ -5,7 +5,6 @@ import random
from .helpers.cfs_helpers import find_by_extensions, find_by_name, find_by_pattern, corrupt_file
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException
module_name = 'cfs_validate_backup'
tblspace_name = 'cfs_tblspace'

View File

@ -1191,7 +1191,7 @@ class DeltaTest(ProbackupTest, unittest.TestCase):
# pgdata = self.pgdata_content(node.data_dir)
#
# node_restored = self.make_simple_node(
# base_dir=os.path.join(module_name, fname, 'node_restored'))
# base_dir=os.path.join(self.module_name, self.fname, 'node_restored'))
# node_restored.cleanup()
#
# self.restore_node(

View File

@ -579,7 +579,7 @@ class LockingTest(ProbackupTest, unittest.TestCase):
self._check_gdb_flag_or_skip_test()
node = self.make_simple_node(
base_dir=os.path.join(self.module_name, self.name, 'node'),
base_dir=os.path.join(self.module_name, self.fname, 'node'),
initdb_params=['--data-checksums'])
backup_dir = os.path.join(self.tmp_path, self.module_name, self.fname, 'backup')

View File

@ -1414,7 +1414,7 @@ class PageTest(ProbackupTest, unittest.TestCase):
# pgdata = self.pgdata_content(node.data_dir)
#
# node_restored = self.make_simple_node(
# base_dir=os.path.join(module_name, fname, 'node_restored'))
# base_dir=os.path.join(self.module_name, self.fname, 'node_restored'))
# node_restored.cleanup()
#
# self.restore_node(

View File

@ -4172,7 +4172,7 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
# pgdata = self.pgdata_content(node.data_dir)
#
# node_restored = self.make_simple_node(
# base_dir=os.path.join(module_name, self.fname, 'node_restored'))
# base_dir=os.path.join(self.module_name, self.fname, 'node_restored'))
# node_restored.cleanup()
#
# self.restore_node(

View File

@ -2789,13 +2789,12 @@ class ValidateTest(ProbackupTest, unittest.TestCase):
PAGE1_1
FULL1
"""
fname = self.id().split('.')[3]
node = self.make_simple_node(
base_dir=os.path.join(self.module_name, self.fname, 'node'),
set_replication=True,
initdb_params=['--data-checksums'])
backup_dir = os.path.join(self.tmp_path, self.module_name, fname, 'backup')
backup_dir = os.path.join(self.tmp_path, self.module_name, self.fname, 'backup')
self.init_pb(backup_dir)
self.add_instance(backup_dir, 'node', node)
self.set_archiving(backup_dir, 'node', node)