mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
Fix children classes of Test
This commit is contained in:
parent
f4ce2c68f2
commit
f5fe685d42
4 changed files with 9 additions and 4 deletions
|
@ -28,6 +28,7 @@ class AutoconfTest(Test):
|
|||
}
|
||||
self._check_domains()
|
||||
|
||||
@staticmethod
|
||||
def init():
|
||||
try:
|
||||
if not Test.init():
|
||||
|
@ -100,6 +101,7 @@ class AutoconfTest(Test):
|
|||
return False
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
def end():
|
||||
ret = True
|
||||
try:
|
||||
|
|
|
@ -25,6 +25,7 @@ class DockerTest(Test):
|
|||
}
|
||||
self._check_domains()
|
||||
|
||||
@staticmethod
|
||||
def init():
|
||||
try:
|
||||
if not Test.init():
|
||||
|
|
|
@ -20,6 +20,7 @@ class KubernetesTest(Test):
|
|||
r"app3\.example\.com": f"{Test.random_string(6)}.{getenv('TEST_DOMAIN3')}",
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def init():
|
||||
try:
|
||||
if not Test.init():
|
||||
|
@ -143,6 +144,7 @@ class KubernetesTest(Test):
|
|||
return False
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
def end():
|
||||
ret = True
|
||||
try:
|
||||
|
|
|
@ -27,9 +27,9 @@ class Test(ABC):
|
|||
f"instiantiated with {len(tests)} tests and timeout of {timeout}s for {self._name}",
|
||||
)
|
||||
|
||||
# Class method
|
||||
# called once before running all the different tests for a given integration
|
||||
def init(self):
|
||||
@staticmethod
|
||||
def init():
|
||||
try:
|
||||
if not isdir("/tmp/bw-data"):
|
||||
mkdir("/tmp/bw-data")
|
||||
|
@ -46,8 +46,8 @@ class Test(ABC):
|
|||
return True
|
||||
|
||||
# Class method
|
||||
# called once all tests ended
|
||||
def end(self):
|
||||
@staticmethod
|
||||
def end():
|
||||
return True
|
||||
|
||||
# helper to check domains
|
||||
|
|
Loading…
Reference in a new issue