aboutsummaryrefslogtreecommitdiffstats
path: root/t/000_test_env.t
diff options
context:
space:
mode:
Diffstat (limited to 't/000_test_env.t')
-rw-r--r--t/000_test_env.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/000_test_env.t b/t/000_test_env.t
new file mode 100644
index 0000000..9484e5b
--- /dev/null
+++ b/t/000_test_env.t
@@ -0,0 +1,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();