From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) 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.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3E7731F520; Fri, 11 May 2018 19:20:19 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: Konstantin Ryabitsev Subject: [PATCH 3/4] t/v2mda: setup emergency Maildir for test Date: Fri, 11 May 2018 19:20:17 +0000 Message-Id: <20180511192018.6432-4-e@80x24.org> In-Reply-To: <20180511192018.6432-1-e@80x24.org> References: <20180511192018.6432-1-e@80x24.org> List-Id: We can't expect ~/.public-inbox to exist for tests nor should we be writing to non-temporary directories during tests. --- t/v2mda.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/v2mda.t b/t/v2mda.t index ca1bb09..f386289 100644 --- a/t/v2mda.t +++ b/t/v2mda.t @@ -36,6 +36,8 @@ ok(-f "blib/script/public-inbox-mda", '-mda exists'); my $main_bin = getcwd()."/t/main-bin"; local $ENV{PI_DIR} = "$tmpdir/foo"; local $ENV{PATH} = "$main_bin:blib/script:$ENV{PATH}"; +local $ENV{PI_EMERGENCY} = "$tmpdir/fail"; +ok(mkdir "$tmpdir/fail"); my @cmd = (qw(public-inbox-init -V2), $ibx->{name}, $ibx->{mainrepo}, 'http://localhost/test', $ibx->{address}->[0]);