aboutsummaryrefslogtreecommitdiffstats
path: root/functest_kubernetes/k8stest.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-08-11 15:56:12 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2021-08-18 13:20:37 +0200
commit8b86dd02328e331cc01b21bf1072e515bbd6db68 (patch)
tree484b197627525fb513bde77fa1e92864e0700565 /functest_kubernetes/k8stest.py
parent89dfd5adb8a1e4ac8a1278e421ef7fd90847c65e (diff)
Update to Alpine 3.14
It also disabled wrong order check as it fails vs kubernetes amongst others. [1] https://github.com/PyCQA/pylint/issues/2175 Change-Id: I3d641c213067428848212a148d25d78051c5674f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest_kubernetes/k8stest.py')
-rw-r--r--functest_kubernetes/k8stest.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/functest_kubernetes/k8stest.py b/functest_kubernetes/k8stest.py
index 2d17a27d..b450dac4 100644
--- a/functest_kubernetes/k8stest.py
+++ b/functest_kubernetes/k8stest.py
@@ -35,7 +35,7 @@ class E2ETesting(testcase.TestCase):
k8s_gcr_repo = os.getenv("MIRROR_REPO", "k8s.gcr.io")
def __init__(self, **kwargs):
- super(E2ETesting, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.cmd = []
self.dir_results = "/home/opnfv/functest/results"
self.res_dir = os.path.join(self.dir_results, self.case_name)
@@ -74,9 +74,10 @@ class E2ETesting(testcase.TestCase):
self.__logger.info("Starting k8s test: '%s'.", cmd_line)
env = os.environ.copy()
env["KUBE_TEST_REPO_LIST"] = "{}/repositories.yml".format(self.res_dir)
- process = subprocess.Popen(cmd_line, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT, env=env)
- boutput = process.stdout.read()
+ with subprocess.Popen(
+ cmd_line, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT, env=env) as process:
+ boutput = process.stdout.read()
with open(os.path.join(self.res_dir, 'e2e.log'), 'wb') as foutput:
foutput.write(boutput)
grp = re.search(