From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3EB581F464 for ; Fri, 29 Nov 2019 10:14:14 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/7] t: localize the PI_CONFIG env Date: Fri, 29 Nov 2019 10:14:08 +0000 Message-Id: <20191129101414.343-2-e@80x24.org> In-Reply-To: <20191129101414.343-1-e@80x24.org> References: <20191129101414.343-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(+) 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,