From 29c5c014315bc9d338a976bc5dc68a3193d4e07e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 9 Feb 2022 09:59:45 -0800 Subject: [PATCH] Revert "Fix the os_release.pm and fedora_release.pm." This reverts commit 182bfdaa55a37549ebccfa471ffbb8fb684bde9d. The problem was not in the test code here, it's just that the tests were run with RAWREL set to 36 when it should be 37; this is because fedfind's data source hadn't been updated for 36 branch when the tests ran. It's tricky to time this exactly right - ideally we'd probably update fedfind's data source one second before the first Branched compose completes, but of course that's difficult in practice. --- tests/fedora_release.pm | 7 ++----- tests/os_release.pm | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/fedora_release.pm b/tests/fedora_release.pm index 723dd3f0..bf700abb 100644 --- a/tests/fedora_release.pm +++ b/tests/fedora_release.pm @@ -19,9 +19,7 @@ sub run { # IoT has a branch that acts more or less like Rawhide, but has # its version as the Rawhide release number, not 'Rawhide'. This # handles that - if (get_var("SUBVARIANT") eq "IoT") { - $tospell = 'Rawhide' if ($tospell eq $rawrel); - } + $tospell = 'Rawhide' if ($tospell eq $rawrel); # this is the Rawhide release number, which we expect to see. $expectver = $rawrel if ($expectver eq "Rawhide"); # Create a spelt form of the version number. @@ -29,8 +27,7 @@ sub run { # Create the expected content of the release file # and compare it with its real counterpart. my $expected = "Fedora release $expectver ($speltnum)"; - diag("The fedora-release content to validate: $expected"); - validate_script_output("cat /etc/fedora-release", qr/$expected/); + validate_script_output 'cat /etc/fedora-release', sub { $_ eq $expected }; } sub test_flags { diff --git a/tests/os_release.pm b/tests/os_release.pm index d66aaa8e..5d53684e 100644 --- a/tests/os_release.pm +++ b/tests/os_release.pm @@ -67,9 +67,7 @@ sub run { # IoT has a branch that acts more or less like Rawhide, but has # its version as the Rawhide release number, not 'Rawhide'. This # handles that - if (get_var("SUBVARIANT") eq "IoT") { - $version_id = 'Rawhide' if ($version_id eq $rawrel); - } + $version_id = 'Rawhide' if ($version_id eq $rawrel); my $varstr = spell_version_number($version_id); my $target = lc($version_id); $version_id = $rawrel if ($version_id eq "Rawhide");