Skip to content

Commit 88b2742

Browse files
committed
tests minor fixes
1 parent 49a8575 commit 88b2742

21 files changed

+12
-90
lines changed

tests/backup_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import os
33
from time import sleep
44
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException
5-
from testgres import stop_all, clean_all
6-
import shutil
75

86

97
class BackupTest(ProbackupTest, unittest.TestCase):

tests/delete_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import unittest
22
import os
33
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException
4-
from testgres import stop_all, clean_all
54
import subprocess
6-
import shutil
75

86

97
class DeleteTest(ProbackupTest, unittest.TestCase):

tests/false_positive.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
import os
33
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException
44
from datetime import datetime, timedelta
5-
from testgres import stop_all, clean_all
65
import subprocess
7-
import shutil
86

97

108
class FalsePositive(ProbackupTest, unittest.TestCase):

tests/init_test.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import unittest
2-
from sys import exit
31
import os
4-
from os import path
2+
import unittest
53
from .helpers.ptrack_helpers import dir_files, ProbackupTest, ProbackupException
6-
from testgres import stop_all, clean_all
7-
import shutil
84

95

106
class InitTest(ProbackupTest, unittest.TestCase):
@@ -67,7 +63,7 @@ def test_abs_path(self):
6763
backup_dir = os.path.join(self.tmp_path, self.module_name, fname, 'backup')
6864
node = self.make_simple_node(base_dir="{0}/{1}/node".format(self.module_name, fname))
6965
try:
70-
self.run_pb(["init", "-B", path.relpath("%s/backup" % node.base_dir, self.dir_path)])
66+
self.run_pb(["init", "-B", os.path.relpath("%s/backup" % node.base_dir, self.dir_path)])
7167
self.assertEqual(1, 0, 'Expecting Error due to initialization with non-absolute path in --backup-path. Output: {0} \n CMD: {1}'.format(
7268
repr(self.output), self.cmd))
7369
except ProbackupException as e:

tests/option_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import unittest
22
import os
33
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException
4-
from testgres import stop_all, clean_all
5-
import shutil
64

75

86
class OptionTest(ProbackupTest, unittest.TestCase):

tests/pgpro560.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
import unittest
33
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException, idx_ptrack
44
from datetime import datetime, timedelta
5-
from testgres import stop_all, clean_all
65
import subprocess
7-
import shutil
86

97

108
class CheckSystemID(ProbackupTest, unittest.TestCase):

tests/pgpro589.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
import unittest
33
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException, idx_ptrack
44
from datetime import datetime, timedelta
5-
from testgres import stop_all, clean_all
65
import subprocess
7-
import shutil
86

97

108
class ArchiveCheck(ProbackupTest, unittest.TestCase):

tests/ptrack_clean.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import os
22
import unittest
3-
from testgres import stop_all, clean_all
43
from .helpers.ptrack_helpers import ProbackupTest, idx_ptrack
5-
import shutil
64

75

86
class SimpleTest(ProbackupTest, unittest.TestCase):

tests/ptrack_cluster.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import os
22
import unittest
3-
from testgres import stop_all, clean_all
43
from .helpers.ptrack_helpers import ProbackupTest, idx_ptrack
5-
import shutil
64

75

86
class SimpleTest(ProbackupTest, unittest.TestCase):

tests/ptrack_move_to_tablespace.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
import os
22
import unittest
3-
from testgres import clean_all, stop_all
43
from .helpers.ptrack_helpers import ProbackupTest, idx_ptrack
5-
import shutil
64

75

86
class SimpleTest(ProbackupTest, unittest.TestCase):
97
def __init__(self, *args, **kwargs):
108
super(SimpleTest, self).__init__(*args, **kwargs)
119
self.module_name = 'ptrack_move_to_tablespace'
1210

13-
# @classmethod
14-
# def tearDownClass(cls):
15-
# clean_all()
16-
# shutil.rmtree(os.path.join(self.tmp_path, self.module_name), ignore_errors=True)
17-
1811
# @unittest.skip("skip")
1912
# @unittest.expectedFailure
2013
def test_ptrack_recovery(self):

0 commit comments

Comments
 (0)