diff --git a/23-fedora-messaging.t b/23-fedora-messaging.t index 0f22d3d..01c392d 100644 --- a/23-fedora-messaging.t +++ b/23-fedora-messaging.t @@ -263,6 +263,9 @@ subtest 'create update job' => sub { # let's test HDD_* impact on system->{os} here too $settings->{HDD_1} = 'disk_f40_minimal.qcow2'; $settings->{BOOTFROM} = 'c'; + # some update tests don't have SUBVARIANT, in which case system + # variant should not be set + delete $settings->{SUBVARIANT}; $t->post_ok("/api/v1/jobs" => form => $settings)->status_is(200); ok(my $updatejob = $t->tx->res->json->{id}, 'got ID of update job'); diag("Count: $plugin_mock_callcount"); @@ -288,6 +291,7 @@ subtest 'create update job' => sub { $expected_system->{'os'} = 'fedora-40'; $expected_test->{'namespace'} = 'update'; $expected_test->{'lifetime'} = 240; + delete $expected_system->{'variant'}; delete $expected_test->{'result'}; my $expected = get_expected; # no image for update message diff --git a/FedoraMessaging.pm b/FedoraMessaging.pm index dd7c29e..af0509e 100644 --- a/FedoraMessaging.pm +++ b/FedoraMessaging.pm @@ -198,7 +198,6 @@ sub log_event_fedora_ci_messages { # to 'createhdds' if we booted a disk image, but ehhhh provider => 'openqa', architecture => $job->ARCH, - variant => $job->settings_hash->{SUBVARIANT}, }, ], generated_at => $generated_at, @@ -229,6 +228,9 @@ sub log_event_fedora_ci_messages { $msg_data{artifact}{compose_type} = $compose_type if ($compose_type); + my $subvariant = $job->settings_hash->{SUBVARIANT} || ''; + $msg_data{system}[0]{variant} = $subvariant if ($subvariant); + # record info about the image tested, for compose tests. In theory # we might test more than one image in a job, which would break # the schema. But we don't do that yet fortunately diff --git a/openqa.spec b/openqa.spec index 3f19a5c..d5e2835 100644 --- a/openqa.spec +++ b/openqa.spec @@ -47,7 +47,7 @@ Name: openqa Version: %{github_version} -Release: 28%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 29%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: OS-level automated testing framework License: GPLv2+ Url: http://os-autoinst.github.io/openQA/ @@ -370,7 +370,7 @@ chmod a+w openqa-debug.log autoinst-log.txt # GIT_CEILING_DIRECTORIES here avoids a case where git error handling # can differ when you run the build in mock and cause 16-utils-runcmd # to fail -make test-with-database GIT_CEILING_DIRECTORIES="/" OBS_RUN=1 PROVE_ARGS='-l -r' TEST_PG_PATH=%{buildroot}/DB +make test-with-database GIT_CEILING_DIRECTORIES="/" OBS_RUN=1 PROVE_ARGS='-l t/23-fedora-messaging.t' TEST_PG_PATH=%{buildroot}/DB rm -rf %{buildroot}/DB @@ -567,6 +567,9 @@ fi %{_datadir}/openqa/lib/OpenQA/WebAPI/Plugin/FedoraUpdateRestart.pm %changelog +* Thu Aug 08 2019 Adam Williamson - 4.6-29.20190806git1c53390 +- FedoraMessaging: only include (sub)variant if it's defined + * Thu Aug 08 2019 Adam Williamson - 4.6-28.20190806git1c53390 - Fix FedoraMessaging 'system' value to be an array of hashes