aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2022-10-17 12:50:04 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2022-10-17 12:51:06 +0200
commit5b8f489cd352e1ae682f0b30870f1e248c65aaf4 (patch)
tree81a9979411a5726fd009ee289519b7bd36c78024
parentb10d3c5a8dfcd1f066f1513389cb2143acefbe63 (diff)
Use cnf certifaction criteria
Change-Id: I7362827b600914ab032ba9657ac17e7bb157bdfc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--docker/cnf/testcases.yaml3
-rw-r--r--functest_kubernetes/cnf_conformance/conformance.py9
2 files changed, 7 insertions, 5 deletions
diff --git a/docker/cnf/testcases.yaml b/docker/cnf/testcases.yaml
index cc28ca1b..30b6b664 100644
--- a/docker/cnf/testcases.yaml
+++ b/docker/cnf/testcases.yaml
@@ -30,7 +30,8 @@ tiers:
- case_name: cnf_testsuite
project_name: functest
- criteria: 1
+ # https://github.com/cncf/cnf-certification/blob/main/reviewing.md
+ criteria: 10
blocking: false
description: >-
Enable interoperability of Cloud native Network
diff --git a/functest_kubernetes/cnf_conformance/conformance.py b/functest_kubernetes/cnf_conformance/conformance.py
index a248928e..bfb0c1bb 100644
--- a/functest_kubernetes/cnf_conformance/conformance.py
+++ b/functest_kubernetes/cnf_conformance/conformance.py
@@ -87,16 +87,17 @@ class CNFConformance(testcase.TestCase):
msg.add_row([item['name'], item['status']])
if item['status'] == "passed":
item_criteria += 1
- else:
+ elif item['status'] == "failed":
self.__logger.warning(
"%s %s", item['name'], item['status'])
self.__logger.info("\n\n%s\n", msg.get_string())
grp = re.search(
- r'Final .* score: (\d+) of (\d+)', output.decode("utf-8"))
+ r'(\d+) of (\d+) essential tests passed', output.decode("utf-8"))
if grp:
- self.result = int(grp.group(1)) / int(grp.group(2)) * 100
+ # https://github.com/cncf/cnf-certification/blob/main/reviewing.md
+ self.result = int(grp.group(1))
else:
- self.result = item_criteria / len(self.details['items']) * 100
+ self.result = 0
if not os.path.exists(self.res_dir):
os.makedirs(self.res_dir)
shutil.copy2(