From b6de8d4f10aaca3f02707be45b4cd2dc04f48a1f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 7 Jan 2017 01:44:49 +0000 Subject: config: allow per-inbox nntpserver This allows certain inboxes to override the global nntpserver (perhaps under a different domain). --- t/config.t | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 't') diff --git a/t/config.t b/t/config.t index 040e9fb2..3ba61119 100644 --- a/t/config.t +++ b/t/config.t @@ -78,6 +78,12 @@ my $tmpdir = tempdir('pi-config-XXXXXX', TMPDIR => 1, CLEANUP => 1); my $cfg = PublicInbox::Config->new(\%tmp); my $ibx = $cfg->lookup_name('test'); is($ibx->{nntpserver}, 'news.example.com', 'global NNTP server'); + + delete $h{'publicinbox.nntpserver'}; + $h{"$pfx.nntpserver"} = 'news.alt.example.com'; + $cfg = PublicInbox::Config->new(\%h); + $ibx = $cfg->lookup_name('test'); + is($ibx->{nntpserver}, 'news.alt.example.com','per-inbox NNTP server'); } done_testing(); -- cgit v1.2.3-24-ge0c7