1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-01-01 07:03:09 +00:00
os-autoinst-distri-fedora/tests/collect_web_data.pm
2024-11-26 14:39:07 +01:00

41 lines
1.4 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self = shift;
# Let's get the $target release version. Most of the time,
# the version will point to a future release. On Rawhide,
# this will not be a number, so we need to convert it
# to a number.
my $target = get_var('VERSION');
if (get_var('VERSION') eq 'Rawhide') {
$target = get_var('RAWREL');
}
# The $current release version is the last stable release
# around that we want to compare.
my $current = get_var('CURRREL');
# Go to the home directory, create a new directory there
# and collect the data
assert_script_run('cd');
assert_script_run('mkdir version_data');
assert_script_run('cd version_data');
# We will fetch the version data from various locations.
# Download data from Bodhi for
assert_script_run("curl -o bodhi-$current.json https://bodhi.fedoraproject.org/releases/F$current");
assert_script_run("curl -o bodhi-$target.json https://bodhi.fedoraproject.org/releases/F$target");
# Download data from Fedora Schedule
assert_script_run("curl -o schedule-$current.json https://fedorapeople.org/groups/schedule/f-$current/f-$current-key.json");
assert_script_run("curl -o schedule-$target.json https://fedorapeople.org/groups/schedule/f-$target/f-$target-key.json");
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: