diff options
author | Eric Wong <e@80x24.org> | 2019-01-30 20:48:53 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-30 20:48:53 +0000 |
commit | 3041de7ee07ca13d3d8465aa68f076269e19fc3b (patch) | |
tree | 502d4b33e8a063c8546259f18c82cd0f08dce0ec /t | |
parent | 218d723d6e52d3ff5627bd55ae418ac6d2763dc6 (diff) | |
download | public-inbox-3041de7ee07ca13d3d8465aa68f076269e19fc3b.tar.gz |
We need to ensure we don't introduce unnecessary processes and memory usage for mapping multiple inboxes to the same code repos.
Diffstat (limited to 't')
-rw-r--r-- | t/config.t | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -169,4 +169,23 @@ for my $s (@valid) { is_deeply(\@result, \@expect); } +{ + my $pfx1 = "publicinbox.test1"; + my $pfx2 = "publicinbox.test2"; + my $h = { + "$pfx1.address" => 'test@example.com', + "$pfx1.mainrepo" => '/path/to/non/existent', + "$pfx2.address" => 'foo@example.com', + "$pfx2.mainrepo" => '/path/to/foo', + "$pfx1.coderepo" => 'project', + "$pfx2.coderepo" => 'project', + "coderepo.project.dir" => '/path/to/project.git', + }; + my $cfg = PublicInbox::Config->new($h); + my $t1 = $cfg->lookup_name('test1'); + my $t2 = $cfg->lookup_name('test2'); + is($t1->{-repo_objs}->[0], $t2->{-repo_objs}->[0], + 'inboxes share ::Git object'); +} + done_testing(); |