Skip to content

Commit 40074ce

Browse files
author
vshepard
committed
Add pg_probackup2 basic_test to run_tests.sh
1 parent e665b0a commit 40074ce

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

run_tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ $PIP install coverage flake8 psutil Sphinx
2727
# install testgres' dependencies
2828
export PYTHONPATH=$(pwd)
2929
$PIP install .
30+
$PIP install testgres/plugins/pg_probackup2
3031

3132
# test code quality
3233
flake8 .
@@ -38,22 +39,21 @@ rm -f $COVERAGE_FILE
3839

3940

4041
# run tests (PATH)
41-
time coverage run -a tests/test_simple.py
42+
time coverage run -a testgres/plugins/pg_probackup2/testgres_pg_probackup2/tests/basic_test.py
4243

4344

4445
# run tests (PG_BIN)
4546
time \
4647
PG_BIN=$(dirname $(which pg_config)) \
4748
ALT_CONFIG=1 \
48-
coverage run -a tests/test_simple.py
49+
coverage run -a testgres/plugins/pg_probackup2/testgres_pg_probackup2/tests/basic_test.py
4950

5051

5152
# run tests (PG_CONFIG)
5253
time \
5354
PG_CONFIG=$(which pg_config) \
5455
ALT_CONFIG=1 \
55-
coverage run -a tests/test_simple.py
56-
56+
coverage run -a testgres/plugins/pg_probackup2/testgres_pg_probackup2/tests/basic_test.py
5757

5858
# show coverage
5959
coverage report

testgres/plugins/pg_probackup2/testgres_pg_probackup2/tests/basic_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ def setup_test_environment(self):
3535
def setup_test_paths(self):
3636
self.rel_path = os.path.join(self.module_name, self.fname)
3737
self.test_path = os.path.join(init_params.tmp_path, self.rel_path)
38-
if os.path.exists(self.test_path):
39-
shutil.rmtree(self.test_path)
4038
os.makedirs(self.test_path)
4139
self.pb_log_path = os.path.join(self.test_path, "pb_log")
4240

4341
def setup_backup_dir(self):
44-
self.backup_dir = build_backup_dir(init_params.backup_rel_path or self.rel_path, 'backup')
42+
self.backup_dir = build_backup_dir(self, 'backup')
4543
self.backup_dir.cleanup()
4644

4745
def setup_probackup(self):
@@ -52,7 +50,6 @@ def setup_probackup(self):
5250
def tearDown(self):
5351
if os.path.exists(self.test_path):
5452
shutil.rmtree(self.test_path)
55-
self.backup_dir.cleanup()
5653

5754

5855
class BasicTest(ProbackupTest):

0 commit comments

Comments
 (0)