Only add the Nix system feature to the test that requires it

This commit is contained in:
regnat 2021-04-29 06:54:25 +02:00
parent abff212d06
commit f61a13d2db
2 changed files with 5 additions and 2 deletions

View file

@ -2,7 +2,11 @@ use feature 'unicode_strings';
use strict; use strict;
use Setup; use Setup;
my %ctx = test_init(); my %ctx = test_init(
nix_config => q|
system-features = test-system-feature
|
);
require Hydra::Schema; require Hydra::Schema;
require Hydra::Model::DB; require Hydra::Model::DB;

View file

@ -48,7 +48,6 @@ sub test_init {
my $nixconf = "$ENV{'NIX_CONF_DIR'}/nix.conf"; my $nixconf = "$ENV{'NIX_CONF_DIR'}/nix.conf";
open(my $fh, '>', $nixconf) or die "Could not open file '$nixconf' $!"; open(my $fh, '>', $nixconf) or die "Could not open file '$nixconf' $!";
print $fh "sandbox = false\n"; print $fh "sandbox = false\n";
print $fh "system-features = test-system-feature\n";
print $fh $opts{'nix_config'} || ""; print $fh $opts{'nix_config'} || "";
close $fh; close $fh;