aboutsummaryrefslogtreecommitdiff
path: root/t/28-race-sboremove.t
diff options
context:
space:
mode:
Diffstat (limited to 't/28-race-sboremove.t')
-rwxr-xr-xt/28-race-sboremove.t57
1 files changed, 0 insertions, 57 deletions
diff --git a/t/28-race-sboremove.t b/t/28-race-sboremove.t
deleted file mode 100755
index 65eaa5d..0000000
--- a/t/28-race-sboremove.t
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-use Test::More;
-use Test::Exit;
-use FindBin '$RealBin';
-use lib $RealBin;
-use Capture::Tiny qw/ capture_merged /;
-use File::Temp 'tempdir';
-use Cwd;
-use feature 'state';
-use Test::Sbotools qw/ set_repo set_lo sboconfig sboinstall sbosnap load /;
-
-if ($ENV{TEST_INSTALL}) {
- plan tests => 2;
-} else {
- plan skip_all => 'Only run these tests if TEST_INSTALL=1';
-}
-
-set_lo("$RealBin/LO2");
-
-# set up git repo with readme slackbuild
-my $tempdir = tempdir(CLEANUP => 0);
-capture_merged { system <<"GIT"; };
-cd $tempdir
-git init
-mkdir test
-cp -a "$RealBin/LO/nonexistentslackbuild8/" test
-git add test
-git commit -m 'first commit'
-GIT
-set_repo("file://$tempdir");
-
-sboconfig qw/ --gpg-key FALSE /, { test => 0 };
-sbosnap 'fetch', { test => 0 };
-
-# install the readme slackbuild
-sboinstall 'nonexistentslackbuild8', { input => "y\ny", test => 0 };
-
-{ package STDINTIE;
- sub TIEHANDLE { bless {}, shift; }
- sub READLINE {
- no warnings 'once', 'redefine';
- *_race::cond = sub {
- unlink "/usr/sbo/repo/test/nonexistentslackbuild8/README";
- };
- "y\n";
- }
-}
-
-tie *STDIN, 'STDINTIE';
-
-my $res = load('sboremove', argv => ['nonexistentslackbuild8']);
-
-like ($res->{out}, qr/Unable to open README for nonexistentslackbuild8\./, 'sboremove output with race condition correct');
-is ($res->{exit}, 0, 'sboremove did not exit in error');