File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
testgres/plugins/pg_probackup2/testgres_pg_probackup2/tests Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ $PIP install coverage flake8 psutil Sphinx
27
27
# install testgres' dependencies
28
28
export PYTHONPATH=$( pwd)
29
29
$PIP install .
30
+ $PIP install testgres/plugins/pg_probackup2
30
31
31
32
# test code quality
32
33
flake8 .
@@ -38,22 +39,21 @@ rm -f $COVERAGE_FILE
38
39
39
40
40
41
# 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
42
43
43
44
44
45
# run tests (PG_BIN)
45
46
time \
46
47
PG_BIN=$( dirname $( which pg_config) ) \
47
48
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
49
50
50
51
51
52
# run tests (PG_CONFIG)
52
53
time \
53
54
PG_CONFIG=$( which pg_config) \
54
55
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
57
57
58
58
# show coverage
59
59
coverage report
Original file line number Diff line number Diff line change @@ -35,13 +35,11 @@ def setup_test_environment(self):
35
35
def setup_test_paths (self ):
36
36
self .rel_path = os .path .join (self .module_name , self .fname )
37
37
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 )
40
38
os .makedirs (self .test_path )
41
39
self .pb_log_path = os .path .join (self .test_path , "pb_log" )
42
40
43
41
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' )
45
43
self .backup_dir .cleanup ()
46
44
47
45
def setup_probackup (self ):
@@ -52,7 +50,6 @@ def setup_probackup(self):
52
50
def tearDown (self ):
53
51
if os .path .exists (self .test_path ):
54
52
shutil .rmtree (self .test_path )
55
- self .backup_dir .cleanup ()
56
53
57
54
58
55
class BasicTest (ProbackupTest ):
You can’t perform that action at this time.
0 commit comments