From e4d3be19612b20829426b129a2e1fb2316d38473 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 29 Nov 2019 10:14:08 +0000 Subject: t: localize the PI_CONFIG env We don't want the user's ~/.public-inbox/config to be read from during tests. I only noticed this because I had a non-existent pathname for one of my inboxes :x I've also verified this change by running "inotifywait ~/.public-inbox/config -m" in another terminal while running "make check"; (perhaps a portable solution could make it into the test suite). --- t/indexlevels-mirror.t | 1 + t/xcpdb-reshard.t | 1 + 2 files changed, 2 insertions(+) (limited to 't') diff --git a/t/indexlevels-mirror.t b/t/indexlevels-mirror.t index f1c338e1..3d4813be 100644 --- a/t/indexlevels-mirror.t +++ b/t/indexlevels-mirror.t @@ -32,6 +32,7 @@ sub import_index_incremental { my ($v, $level) = @_; my $this = "pi-$v-$level-indexlevels"; my ($tmpdir, $for_destroy) = tmpdir(); + local $ENV{PI_CONFIG} = "$tmpdir/config"; my $ibx = PublicInbox::Inbox->new({ inboxdir => "$tmpdir/testbox", name => $this, diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t index ebf156a3..a4ab35d6 100644 --- a/t/xcpdb-reshard.t +++ b/t/xcpdb-reshard.t @@ -25,6 +25,7 @@ my $mime = PublicInbox::MIME->create( my ($this) = (split('/', $0))[-1]; my ($tmpdir, $for_destroy) = tmpdir(); +local $ENV{PI_CONFIG} = "$tmpdir/config"; my $ibx = PublicInbox::Inbox->new({ inboxdir => "$tmpdir/testbox", name => $this, -- cgit v1.2.3-24-ge0c7