From: Eric Wong <e@yhbt.net>
Date: Thu, 6 Feb 2020 09:18:37 +0000 (+0000)
Subject: t/multi-mid: don't access ~/.public-inbox/config
X-Git-Tag: v1.3.0~14
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=314079846791633be4c59932c7eefa6b242cb2ca;p=public-inbox.git

t/multi-mid: don't access ~/.public-inbox/config

It can cause unpredictable behavior and also slow things down.

Followup-to: e4d3be19612b2082 ("t: localize the PI_CONFIG env")
---

diff --git a/t/multi-mid.t b/t/multi-mid.t
index 0d283a0d..94c0e0a2 100644
--- a/t/multi-mid.t
+++ b/t/multi-mid.t
@@ -48,8 +48,8 @@ for my $order ([$bad, $good], [$good, $bad]) {
 	}
 	my $rdr = { 1 => \(my $out = ''), 2 => \(my $err = '') };
 	my $cmd = [ '-convert', $ibx->{inboxdir}, "$tmpdir/v2" ];
-	ok(run_script($cmd, undef, $rdr),
-		'convert to v2');
+	my $env = { PI_DIR => "$tmpdir/.public-inbox" };
+	ok(run_script($cmd, $env, $rdr), 'convert to v2');
 	$err =~ s!\AW: $tmpdir/v1 not configured[^\n]+\n!!s;
 	is($err, '', 'no errors or warnings from -convert');
 	$ibx->{version} = 2;