Fix children classes of Test

This commit is contained in:
Théophile Diot 2023-10-04 17:50:21 +02:00
parent f4ce2c68f2
commit f5fe685d42
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06
4 changed files with 9 additions and 4 deletions

View file

@ -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:

View file

@ -25,6 +25,7 @@ class DockerTest(Test):
}
self._check_domains()
@staticmethod
def init():
try:
if not Test.init():

View file

@ -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:

View file

@ -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