From: Eric Wong Date: Fri, 29 Nov 2019 10:14:08 +0000 (+0000) Subject: t: localize the PI_CONFIG env X-Git-Tag: v1.3.0~244 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e4d3be19612b20829426b129a2e1fb2316d38473;p=public-inbox.git 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). --- 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,