From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/5] t/config.t: test PublicInbox::Git sharing between inboxes
Date: Thu, 31 Jan 2019 04:27:20 +0000 [thread overview]
Message-ID: <20190131042724.2675-2-e@80x24.org> (raw)
In-Reply-To: <20190131042724.2675-1-e@80x24.org>
We need to ensure we don't introduce unnecessary processes
and memory usage for mapping multiple inboxes to the same
code repos.
---
t/config.t | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/t/config.t b/t/config.t
index 7531fd7..ad738bd 100644
--- a/t/config.t
+++ b/t/config.t
@@ -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();
--
EW
next prev parent reply other threads:[~2019-01-31 4:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 4:27 [PATCH 0/5] a few more solver fixups and improvements Eric Wong
2019-01-31 4:27 ` Eric Wong [this message]
2019-01-31 4:27 ` [PATCH 2/5] inbox: perform cleanup of Git objects for coderepos Eric Wong
2019-01-31 4:27 ` [PATCH 3/5] solvergit: allow searching on longer-than-needed OIDs Eric Wong
2019-01-31 4:27 ` [PATCH 4/5] solvergit: allow shorter-than-necessary OIDs from user Eric Wong
2019-01-31 4:27 ` [PATCH 5/5] viewvcs: support streaming large blobs Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190131042724.2675-2-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).