aboutsummaryrefslogtreecommitdiffstats
path: root/t/000_test_env.t
blob: 9484e5b1e6f9437be200740dcae1a133d78de14a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# These tests check that the testing environment is complete.
#

use Test::Most;

bail_on_fail;

my ($image_path) = @ARGV;

# FIXME why need to be root? for mounting the ISO only?
# FIXME USER or USERNAME?
is($ENV{USERNAME}, 'root', "Current user is root.");

# TODO move this elsewhere maybe?
sub pkg_check { my ($pkg) = @_; return system("rpm -q $pkg >/dev/null"); }

my @packages = qw(cdrkit cdrkit-isotools mono gnupg);

foreach my $p (@packages) {
    is(pkg_check($p), 0, sprintf("%s is installed.", $p));
}

done_testing();