#18 Store the test.type and use it to reconstruct the test case name correctly
Merged 4 years ago by pingou. Opened 4 years ago by pingou.
pingou/ci-resultsdb-listener test_type  into  master

@@ -47,6 +47,7 @@ 

              "koji_task_id": message.body["artifact"]["id"],

              "namespace": message.body["test"]["namespace"],

              "type": message.body["artifact"]["type"].replace("-", "_"),

+             "test_type": message.body["test"]["type"],

              "category": message.body["test"]["category"],

          }

  

@@ -73,9 +73,13 @@ 

      def send(self, result):

          # Old version of CI messages didn't define namespace, type or category

          # topic was used for test case name

-         if "namespace" in result and "type" in result and "category" in result:

+         if (

+             "namespace" in result

+             and "test_type" in result

+             and "category" in result

+         ):

              testcase_name = ".".join(

-                 [result["namespace"], result["type"], result["category"]]

+                 [result["namespace"], result["test_type"], result["category"]]

              )

          else:

              testcase_name = result["topic"]

@@ -80,6 +80,7 @@ 

                  "status": "failed",

                  "namespace": "fedora-ci.koji-build",

                  "type": "koji_build",

+                 "test_type": "tier0",

                  "category": "functional",

                  "topic": "org.centos.prod.ci.koji-build.test.complete",

                  "msg_id": "random_uuid",

@@ -80,6 +80,7 @@ 

                  "status": "passed",

                  "namespace": "fedora-ci.koji-build",

                  "type": "koji_build",

+                 "test_type": "tier0",

                  "category": "functional",

                  "topic": "org.centos.prod.ci.koji-build.test.complete",

                  "msg_id": "random_uuid",

@@ -79,6 +79,7 @@ 

                  "koji_task_id": 37704421,

                  "namespace": "fedora-ci.koji-build",

                  "type": "koji_build",

+                 "test_type": "tier0",

                  "category": "functional",

                  "topic": "org.centos.prod.ci.koji-build.test.error",

                  "msg_id": "random_uuid",

@@ -76,6 +76,7 @@ 

                  "koji_task_id": 37704421,

                  "namespace": "fedora-ci.koji-build",

                  "type": "koji_build",

+                 "test_type": "tier0",

                  "category": "functional",

                  "topic": "org.centos.prod.ci.koji-build.test.queued",

                  "msg_id": "random_uuid",

@@ -77,6 +77,7 @@ 

                  "koji_task_id": 37704421,

                  "namespace": "fedora-ci.koji-build",

                  "type": "koji_build",

+                 "test_type": "tier0",

                  "category": "functional",

                  "topic": "org.centos.prod.ci.koji-build.test.running",

                  "msg_id": "random_uuid",