From 586a59e00d00f2b1347f015911545b722f2d1f8b Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Mon, 5 Dec 2011 22:55:33 +0000 Subject: First import, test suite attempt for built ISOs Code heavily taken from previous dams work, reorganized in a test suite to better separate test cases. Does basic things already (in t/). Needs more fixes (esp. in t_install_iso/). --- t/000_test_env.t | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 t/000_test_env.t (limited to 't/000_test_env.t') 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(); -- cgit v1.2.1