]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/multi-mid: don't access ~/.public-inbox/config
authorEric Wong <e@yhbt.net>
Thu, 6 Feb 2020 09:18:37 +0000 (09:18 +0000)
committerEric Wong <e@yhbt.net>
Thu, 6 Feb 2020 19:10:51 +0000 (19:10 +0000)
It can cause unpredictable behavior and also slow things down.

Followup-to: e4d3be19612b2082 ("t: localize the PI_CONFIG env")
t/multi-mid.t

index 0d283a0d08a9188762c3b3d6b7ee9e4cc9d83e58..94c0e0a288c8b4908e8aff8fc3f1675b8fe1263b 100644 (file)
@@ -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;