aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2025-01-27 11:29:04 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2025-01-27 12:59:39 +0100
commitd5f8283567a66c9636910b0afe3f7d8e90195192 (patch)
tree11680d5eb45c60bd10cce6e56db086ce1d21181f
parentae580ac69b15a96875b08c4a380887e128b76ca7 (diff)
Upgrade cnf_testsuite to latest change
uninstall_all is needed as well as pss support. note: we must keep deleting the namespaces until [1] is fixed [1] https://github.com/cnti-testcatalog/testsuite/issues/2213 Change-Id: I65cd11bf02d8df049f964809eee1d51715e75473 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit d912f5609a0f743f6be2d3c235eb7656f96dc8b4)
-rw-r--r--docker/cnf/Dockerfile2
-rw-r--r--functest_kubernetes/cnf_conformance/conformance.py24
2 files changed, 3 insertions, 23 deletions
diff --git a/docker/cnf/Dockerfile b/docker/cnf/Dockerfile
index 12e1d8c9..5bea542d 100644
--- a/docker/cnf/Dockerfile
+++ b/docker/cnf/Dockerfile
@@ -1,7 +1,7 @@
FROM opnfv/functest-kubernetes-core:v1.32
ARG K8S_TAG=1.32
-ARG CNF_TESTSUITE_TAG=v1.4.0
+ARG CNF_TESTSUITE_TAG=4bf8e73992eee555cb0b56f88729de9369d64064
ARG HELM_TAG=v3.6.0
USER root
diff --git a/functest_kubernetes/cnf_conformance/conformance.py b/functest_kubernetes/cnf_conformance/conformance.py
index 22cdbff6..bd98e0e4 100644
--- a/functest_kubernetes/cnf_conformance/conformance.py
+++ b/functest_kubernetes/cnf_conformance/conformance.py
@@ -64,26 +64,6 @@ class CNFConformance(testcase.TestCase):
if os.path.exists(os.path.join(self.src_dir, "results")):
shutil.rmtree(os.path.join(self.src_dir, "results"))
api_response = self.corev1.list_namespace()
- for namespace in ["cnf-testsuite", "cnf-default", "litmus"]:
- for item in api_response.items:
- if item.metadata.name == namespace:
- self.corev1.patch_namespace(
- namespace,
- client.V1Namespace(metadata=client.V1ObjectMeta(
- labels={
- "pod-security.kubernetes.io/enforce":
- "privileged"})))
- self.__logger.debug(
- "patch_namespace: %s", namespace)
- break
- else:
- self.corev1.create_namespace(
- client.V1Namespace(metadata=client.V1ObjectMeta(
- name=namespace, labels={
- "pod-security.kubernetes.io/enforce":
- "privileged"})))
- self.__logger.debug(
- "create_namespace: %s", namespace)
os.chdir(self.src_dir)
cmd = ['cnf-testsuite', 'setup', '-l', 'debug']
try:
@@ -155,13 +135,13 @@ class CNFConformance(testcase.TestCase):
self.stop_time = time.time()
def clean(self):
- for clean_cmd in ['cnf_uninstall']:
+ for clean_cmd in ['cnf_uninstall', 'uninstall_all']:
cmd = ['cnf-testsuite', clean_cmd,
'cnf-config=cnf-testsuite.yml']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
try:
- for namespace in ["cnf-testsuite", "cnf-default", "litmus"]:
+ for namespace in ["cnf-testsuite", "cnf-default"]:
self.corev1.delete_namespace(namespace)
self.__logger.debug("delete_namespace: %s", namespace)
except client.rest.ApiException: