Merge pull request #1003 from DeterminateSystems/perlcritic-level-4
perlcritic: level 4
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init(hydra_config => q|
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init(
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init(hydra_config => q|
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use Data::Dumper;
|
||||
my %ctx = test_init();
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use IO::Uncompress::Bunzip2 qw(bunzip2);
|
||||
use Archive::Tar;
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use Data::Dumper;
|
||||
my %ctx = test_init();
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use JSON qw(decode_json encode_json);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
my %ctx = test_init();
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use Data::Dumper;
|
||||
my %ctx = test_init();
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use JSON qw(decode_json encode_json);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use JSON qw(decode_json encode_json);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use Data::Dumper;
|
||||
use Test2::V0;
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use JSON;
|
||||
use File::Copy;
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package Setup;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Exporter;
|
||||
use Test::PostgreSQL;
|
||||
use File::Temp;
|
||||
@ -49,7 +50,7 @@ sub test_init {
|
||||
$ENV{'NIX_CONF_DIR'} = "$dir/nix/etc/nix";
|
||||
make_path($ENV{'NIX_CONF_DIR'});
|
||||
my $nixconf = "$ENV{'NIX_CONF_DIR'}/nix.conf";
|
||||
my $nix_config = "sandbox = false\n" . $opts{'nix_config'};
|
||||
my $nix_config = "sandbox = false\n" . ($opts{'nix_config'} || "");
|
||||
write_file($nixconf, $nix_config);
|
||||
$ENV{'HYDRA_CONFIG'} = "$dir/hydra.conf";
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init(
|
||||
|
@ -1,4 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use File::Basename;
|
||||
use Hydra::Model::DB;
|
||||
use Hydra::Helper::Nix;
|
||||
@ -38,12 +39,12 @@ ok(-e "/tmp/s3/hydra/$successful_hash.nar", "The nar of a build that's a root is
|
||||
ok(-e "/tmp/s3/hydra/$successful_hash.narinfo", "The narinfo of a build that's a root is not removed by gc");
|
||||
|
||||
my $gcRootsDir = getGCRootsDir;
|
||||
opendir DIR, $gcRootsDir or die;
|
||||
while(readdir DIR) {
|
||||
next if $_ eq "." or $_ eq "..";
|
||||
unlink "$gcRootsDir/$_";
|
||||
opendir my $dir, $gcRootsDir or die;
|
||||
while(my $file = readdir $dir) {
|
||||
next if $file eq "." or $file eq "..";
|
||||
unlink "$gcRootsDir/$file";
|
||||
}
|
||||
closedir DIR;
|
||||
closedir $dir;
|
||||
system("hydra-s3-backup-collect-garbage");
|
||||
ok(not -e "/tmp/s3/hydra/$successful_hash.nar", "The nar of a build that's not a root is removed by gc");
|
||||
ok(not -e "/tmp/s3/hydra/$successful_hash.narinfo", "The narinfo of a build that's not a root is removed by gc");
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,5 +1,6 @@
|
||||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
@ -1,3 +1,5 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use LWP::UserAgent;
|
||||
use JSON;
|
||||
|
||||
|
Reference in New Issue
Block a user