diff options
| author | Slack Coder <slackcoder@server.ky> | 2024-11-28 09:59:36 -0500 |
|---|---|---|
| committer | Slack Coder <slackcoder@server.ky> | 2025-02-19 09:55:01 -0500 |
| commit | 24493e32d8548110c514db9bc09efb5aba276ca5 (patch) | |
| tree | 80319bacf6eb845741beb8d331969884495d6f4c /t/30-race-sboconfig.t | |
| parent | 82a520dcb6f6cfe538c68fd04a8a7b94f3b177c2 (diff) | |
| download | sbotools2-24493e32d8548110c514db9bc09efb5aba276ca5.tar.xz | |
Set To Do branch
Diffstat (limited to 't/30-race-sboconfig.t')
| -rwxr-xr-x | t/30-race-sboconfig.t | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/t/30-race-sboconfig.t b/t/30-race-sboconfig.t deleted file mode 100755 index 8b245e2..0000000 --- a/t/30-race-sboconfig.t +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use Test::More; -use Test::Exit; -use FindBin '$RealBin'; -use lib $RealBin; -use Test::Sbotools 'load'; -use Capture::Tiny qw/ capture_merged /; -use File::Temp 'tempdir'; -use Cwd; - -plan tests => 2; - -# 1-2: sbocheck race test... -{ - load('sboconfig'); - - my $file = "/etc/sbotools/sbotools.conf"; - mkdir "/etc/sbotools"; - rename $file, "$file.bak"; - - no warnings 'redefine', 'once'; - local *main::open_fh = sub { return "Unable to open $file.\n", 6; }; - - my $exit; - my $out = capture_merged { $exit = exit_code { main::config_write(1,2); }; }; - - like ($out, qr/\QUnable to open $file./, "sboconfig's config_write() gave correct output"); - is ($exit, 6, "sboconfig's config_write() exited with 6"); - - rename "$file.bak", $file; -} |
