CatalystUtils.pm: don't use Hydra::Helper::Nix
Using it causes database information to get fixated early, before tests can set a new database. We only used it in one case, and that is an absolute reference anyway. The tests for channel generation are passing, and that uses [requireLocalStore, so this should be fine.
This commit is contained in:
parent
a5b8221a43
commit
ceb6ea252a
|
@ -6,7 +6,6 @@ use warnings;
|
||||||
use Exporter;
|
use Exporter;
|
||||||
use ReadonlyX;
|
use ReadonlyX;
|
||||||
use Nix::Store;
|
use Nix::Store;
|
||||||
use Hydra::Helper::Nix;
|
|
||||||
|
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @EXPORT = qw(
|
our @EXPORT = qw(
|
||||||
|
@ -414,6 +413,7 @@ sub approxTableSize {
|
||||||
|
|
||||||
sub requireLocalStore {
|
sub requireLocalStore {
|
||||||
my ($c) = @_;
|
my ($c) = @_;
|
||||||
|
require Hydra::Helper::Nix;
|
||||||
notFound($c, "Nix channels are not supported by this Hydra server.") if !Hydra::Helper::Nix::isLocalStore();
|
notFound($c, "Nix channels are not supported by this Hydra server.") if !Hydra::Helper::Nix::isLocalStore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue