]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/v2mda: setup emergency Maildir for test
authorEric Wong <e@80x24.org>
Fri, 11 May 2018 19:20:17 +0000 (19:20 +0000)
committerEric Wong <e@80x24.org>
Fri, 11 May 2018 19:23:09 +0000 (19:23 +0000)
We can't expect ~/.public-inbox to exist for tests nor should
we be writing to non-temporary directories during tests.

t/v2mda.t

index ca1bb09c8ce27abe9d26f051eb98826d50993b5e..f386289ad1664c19401ce4160c5f5b5060a395a4 100644 (file)
--- 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]);