From 18863fecb5a238356e59bb5776873643325045fc Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Oct 18 2017 21:49:33 +0000 Subject: Tweak resultsdb scenario not to include VERSION or TEST For resultsdb we decided test name + scenario should be taken together, so including the test name in the scenario is not necessary. threebean pointed out that including VERSION is awkward for greenwave use (and anything that wants to specify a list of possible / expected scenarios), and not necessary for Fedora results as the BUILD and/or ITEM should always identify the release version... --- diff --git a/fedora_openqa/report.py b/fedora_openqa/report.py index b48b9ba..ba6dd4e 100644 --- a/fedora_openqa/report.py +++ b/fedora_openqa/report.py @@ -433,10 +433,12 @@ def resultsdb_report(resultsdb_url=None, jobs=None, build=None, do_report=True, rdb_object = rdbpartial(**kwargs) # Add some more extradata items + # for resultsdb purposes we don't want VERSION or TEST in the scenario + scenkeys = [key for key in JOB_SCENARIO_WITH_MACHINE_KEYS if key not in ('VERSION', 'TEST')] rdb_object.extradata.update({ 'firmware': 'uefi' if 'UEFI' in job['settings'] else 'bios', 'arch': job['settings']['ARCH'], - 'scenario': '.'.join(job['settings'][key] for key in JOB_SCENARIO_WITH_MACHINE_KEYS) + 'scenario': '.'.join(job['settings'][key] for key in scenkeys) }) # FIXME: use overall_url as a group ref_url diff --git a/tests/test_report.py b/tests/test_report.py index bff804d..6d3bb57 100644 --- a/tests/test_report.py +++ b/tests/test_report.py @@ -369,7 +369,7 @@ class TestResultsDBReport: assert fakeres.call_args[1]['testcase']['name'] == 'compose.server_realmd_join_kickstart' assert fakeres.call_args[1]['firmware'] == 'bios' assert fakeres.call_args[1]['outcome'] == 'PASSED' - scenario = 'fedora.Rawhide.Server-dvd-iso.x86_64.server_realmd_join_kickstart.64bit' + scenario = 'fedora.Server-dvd-iso.x86_64.64bit' assert fakeres.call_args[1]['scenario'] == scenario def test_update(self, fakeres, oqaclientmock, jobdict02):