]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_bad_mids.t
config: we always have {-section_order}
[public-inbox.git] / t / psgi_bad_mids.t
index 5008f5be6b65aefec9b08595612e46126f4a9ad0..95196a3f4b91f18859791090845be414d17ba00e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -7,7 +7,7 @@ use File::Temp qw/tempdir/;
 use PublicInbox::MIME;
 use PublicInbox::Config;
 use PublicInbox::WWW;
-my @mods = qw(DBD::SQLite Search::Xapian HTTP::Request::Common Plack::Test
+my @mods = qw(DBD::SQLite HTTP::Request::Common Plack::Test
                URI::Escape Plack::Builder);
 foreach my $mod (@mods) {
        eval "require $mod";
@@ -22,6 +22,7 @@ my $ibx = {
        name => 'bad-mids',
        version => 2,
        -primary_address => 'test@example.com',
+       indexlevel => 'basic',
 };
 $ibx = PublicInbox::Inbox->new($ibx);
 my $im = PublicInbox::V2Writable->new($ibx, 1);
@@ -52,11 +53,11 @@ Date: Fri, 02 Oct 1993 00:00:0$i +0000
 }
 $im->done;
 
-my $cfg = {
-       "$cfgpfx.address" => $ibx->{-primary_address},
-       "$cfgpfx.mainrepo" => $mainrepo,
-};
-my $config = PublicInbox::Config->new($cfg);
+my $cfg = <<EOF;
+$cfgpfx.address=$ibx->{-primary_address}
+$cfgpfx.mainrepo=$mainrepo
+EOF
+my $config = PublicInbox::Config->new(\$cfg);
 my $www = PublicInbox::WWW->new($config);
 test_psgi(sub { $www->call(@_) }, sub {
        my ($cb) = @_;