X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Fconfig.t;h=0866f264e151bffcabda1f9d1bb9055bdc48d33f;hp=3b4b12b32c20715ccfa60c6a665b43da9036212a;hb=3c39f9c942a6975245fda878e9b957d8d3367662;hpb=28264f7af4d9f4fab951f0613a0b08b6e98af7d3 diff --git a/t/config.t b/t/config.t index 3b4b12b3..0866f264 100644 --- a/t/config.t +++ b/t/config.t @@ -24,7 +24,7 @@ my $tmpdir = tempdir('pi-config-XXXXXX', TMPDIR => 1, CLEANUP => 1); my $cfg = PublicInbox::Config->new($f); is_deeply($cfg->lookup('meta@public-inbox.org'), { - 'mainrepo' => '/home/pi/meta-main.git', + 'inboxdir' => '/home/pi/meta-main.git', 'address' => [ 'meta@public-inbox.org' ], 'domain' => 'public-inbox.org', 'url' => 'http://example.com/meta', @@ -44,7 +44,7 @@ my $tmpdir = tempdir('pi-config-XXXXXX', TMPDIR => 1, CLEANUP => 1); 'sandbox@public-inbox.org', 'test@public-inbox.org'], -primary_address => 'try@public-inbox.org', - 'mainrepo' => '/home/pi/test-main.git', + 'inboxdir' => '/home/pi/test-main.git', 'domain' => 'public-inbox.org', 'name' => 'test', feedmax => 25, @@ -66,13 +66,29 @@ $cfgpfx.altid=serial:enamg:file=b EOF my $ibx = $config->lookup_name('test'); is_deeply($ibx->{altid}, [ @altid ]); + + $config = PublicInbox::Config->new(\<lookup_name('test'); + is($ibx->{inboxdir}, '/path/to/non/existent', 'mainrepo still works'); + + $config = PublicInbox::Config->new(\<lookup_name('test'); + is($ibx->{inboxdir}, '/path/to/non/existent', + 'inboxdir takes precedence'); } { my $pfx = "publicinbox.test"; my $str = <new(\$str); @@ -81,7 +97,7 @@ EOF $str = <new(\$str); @@ -95,9 +111,9 @@ EOF my $pfx2 = "publicinbox.foo"; my $str = <