From ae94440df8c4c2a263a9f6856e8bd81f574fa3d0 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 27 May 2019 16:45:57 +0100 Subject: [PATCH] #571 tests should not use user local config --- xt/00-compile.t | 2 ++ xt/10-sort_port.t | 8 ++++++-- xt/11-portsort.t | 5 ++++- xt/20-checkacl.t | 5 ++++- xt/30-backend-workers.t | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/xt/00-compile.t b/xt/00-compile.t index f9e3b606..5e16a528 100644 --- a/xt/00-compile.t +++ b/xt/00-compile.t @@ -13,6 +13,8 @@ BEGIN { unshift @INC, dir($FindBin::RealBin)->parent->subdir('lib')->stringify, dir($FindBin::RealBin, 'lib')->stringify; + + $ENV{DANCER_ENVDIR} = '/dev/null'; } # for netdisco app config diff --git a/xt/10-sort_port.t b/xt/10-sort_port.t index dc6a89e2..264383f2 100644 --- a/xt/10-sort_port.t +++ b/xt/10-sort_port.t @@ -1,6 +1,10 @@ -#!/usr/bin/perl +#!/usr/bin/env perl + +use strict; +use warnings; + +BEGIN { $ENV{DANCER_ENVDIR} = '/dev/null'; } -use strict; use warnings FATAL => 'all'; use Test::More 0.88; use Test::File::ShareDir::Dist { 'App-Netdisco' => 'share/' }; diff --git a/xt/11-portsort.t b/xt/11-portsort.t index a0330a53..54684d4a 100644 --- a/xt/11-portsort.t +++ b/xt/11-portsort.t @@ -1,7 +1,10 @@ -#!/usr/bin/perl +#!/usr/bin/env perl + use strict; use warnings; +BEGIN { $ENV{DANCER_ENVDIR} = '/dev/null'; } + use Test::More; use Env::Path; use FindBin qw( $Bin ); diff --git a/xt/20-checkacl.t b/xt/20-checkacl.t index 99b2e830..32c33758 100644 --- a/xt/20-checkacl.t +++ b/xt/20-checkacl.t @@ -1,6 +1,9 @@ #!/usr/bin/env perl -use strict; use warnings FATAL => 'all'; +use strict; use warnings; + +BEGIN { $ENV{DANCER_ENVDIR} = '/dev/null'; } + use Test::More 1.302083; use Test::File::ShareDir::Dist { 'App-Netdisco' => 'share/' }; diff --git a/xt/30-backend-workers.t b/xt/30-backend-workers.t index e5192a1f..4fa0e445 100644 --- a/xt/30-backend-workers.t +++ b/xt/30-backend-workers.t @@ -1,6 +1,9 @@ #!/usr/bin/env perl -use strict; use warnings FATAL => 'all'; +use strict; use warnings; + +BEGIN { $ENV{DANCER_ENVDIR} = '/dev/null'; } + use Test::More 0.88; use Test::File::ShareDir::Dist { 'App-Netdisco' => 'share/' };