diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-31 14:11:05 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-31 22:52:46 +0100 |
commit | 0fa2eeeb4b04a61f7d18e1732e287c975de9a2e8 (patch) | |
tree | fd9a3958fed348593d0fb11e0b2219ba814a733e /t/fail.t | |
parent | 2299058f93fe1b8c6fed2f2f030820154b14db71 (diff) | |
download | sbotools2-0fa2eeeb4b04a61f7d18e1732e287c975de9a2e8.tar.xz |
Fix up tests for download and md5sum depenency fails. See #23
Diffstat (limited to 't/fail.t')
-rwxr-xr-x | t/fail.t | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -11,7 +11,7 @@ use lib "$RealBin/../SBO-Lib/lib"; use Test::Execute; if ($ENV{TEST_INSTALL}) { - plan tests => 4; + plan tests => 6; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -78,15 +78,14 @@ SKIP: { # 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 }); +# 5-6: Failing download and md5sum in dependency SKIP: { skip "Not doing online tests", 2 unless $ENV{TEST_ONLINE}; - script (qw/ sboinstall nonexistentslackbuild3 /); - script (qw/ sboinstall nonexistentslackbuild4 /); + script (qw/ sboinstall nonexistentslackbuild3 /, {input => "y\ny\ny\nn", expected => qr!Failures:\n failingdownload: Unable to wget http://www[.]pastemobile[.]org/perf[.]dummy[.]fail[.]\n!, exit => 5}); + script (qw/ sboinstall nonexistentslackbuild4 /, {input => "y\ny\ny\nn", expected => qr!Failures:\n failingmd5sum: md5sum failure for /usr/sbo/distfiles/perf[.]dummy[.]\n!, exit => 4}); } - - # Cleanup END { set_lo('delete'); |