]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
test_common: delete wal param when creating inbox
authorEric Wong <e@80x24.org>
Tue, 26 Aug 2025 19:50:50 +0000 (19:50 +0000)
committerEric Wong <e@80x24.org>
Thu, 28 Aug 2025 18:48:21 +0000 (18:48 +0000)
We don't want the `{wal}' field leaking into the Inbox object,
it only needs to be in the hashref populated by Getopt::Long.

lib/PublicInbox/TestCommon.pm

index 7b173b61124a62f399386975f1deca1aec0e6036..295b51d6e026f0300bf418035be03358e30f6d9a 100644 (file)
@@ -948,7 +948,7 @@ sub create_inbox ($;@) {
        $opt{-primary_address} //= $addr->[0] // "$ident\@example.com";
        my $parallel = delete($opt{importer_parallel}) // 0;
        my $creat_opt = { nproc => delete($opt{nproc}) // 1 };
-       $creat_opt->{wal} = 1 if $opt{wal};
+       $creat_opt->{wal} = 1 if delete $opt{wal};
        my $ibx = PublicInbox::InboxWritable->new({ %opt }, $creat_opt);
        if (!-f "$dir/creat.stamp") {
                my $im = $ibx->importer($parallel);