aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-31 13:55:51 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-31 22:52:46 +0100
commit3497e4c081ccb854a674bb84324671ea7733b72b (patch)
tree934ed544cf154cc8a7250bdd12c40426bcd67c62
parent639440b3441d6e2a1bec26e482d26729caad3295 (diff)
downloadsbotools2-3497e4c081ccb854a674bb84324671ea7733b72b.tar.xz
Add test for md5sum fail. See #23
-rwxr-xr-xt/fail.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/fail.t b/t/fail.t
index 8e61c7a..6cda040 100755
--- a/t/fail.t
+++ b/t/fail.t
@@ -11,7 +11,7 @@ use lib "$RealBin/../SBO-Lib/lib";
use Test::Execute;
if ($ENV{TEST_INSTALL}) {
- plan tests => 3;
+ plan tests => 4;
} else {
plan skip_all => 'Only run these tests if TEST_INSTALL=1';
}
@@ -67,14 +67,15 @@ set_lo();
# 1: Failing slackbuild script
script (qw/ sboinstall failingslackbuild /, { input => "y\ny", expected => qr/Failures:\n failingslackbuild: failingslackbuild.SlackBuild return non-zero\n\z/, exit => 3 });
-# 2: Failing download
+# 2-3: Failing download and md5sum
SKIP: {
skip "Not doing online tests", 1 unless $ENV{TEST_ONLINE};
script (qw/ sboinstall failingdownload /, { input => "y\ny\nn", expected => qr!Failures:\n failingdownload: Unable to wget http://www[.]pastemobile[.]org/perf[.]dummy[.]fail[.]\n!, exit => 5 });
+ script (qw/ sboinstall failingmd5sum /, { input => "y\ny\nn", expected => qr!Failures:\n failingmd5sum: md5sum failure for /usr/sbo/distfiles/perf[.]dummy[.]\n!, exit => 4 });
}
-# 3: Failing dependency
+# 4: Failing dependency
script (qw/ sboinstall nonexistentslackbuild2 /, { input => "y\ny\ny\nn", expected => qr/Failures:\n failingslackbuild: failingslackbuild.SlackBuild return non-zero\n/, exit => 3 });
# Cleanup