user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
 Warning: Initial query:
 %22t/nntpd: reduce dependencies on internal API%22
 returned no results, used:
 "t/nntpd: reduce dependencies on internal API"
 instead

Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/3] t/nntpd: reduce dependencies on internal API
  2020-04-21  3:22  5% [PATCH 0/3] t/nntpd: small fixes and cleanups Eric Wong
@ 2020-04-21  3:22  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-04-21  3:22 UTC (permalink / raw)
  To: meta

Since the advent of run_script(), we can rely on it to simplify
our test code.  Changes like this will let us evolve the
internal API more easily while preserving stable CLI interfaces,
especially since we test the v2 path by default, now.
---
 t/nntpd.t | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/t/nntpd.t b/t/nntpd.t
index b2ef575d..2d7280a5 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -6,8 +6,6 @@ use Test::More;
 use PublicInbox::TestCommon;
 use PublicInbox::Spawn qw(which);
 require_mods(qw(DBD::SQLite));
-require PublicInbox::SearchIdx;
-require PublicInbox::Msgmap;
 require PublicInbox::InboxWritable;
 use Email::Simple;
 use IO::Socket;
@@ -79,8 +77,8 @@ EOF
 		$im->add($mime);
 		$im->done;
 		if ($version == 1) {
-			my $s = PublicInbox::SearchIdx->new($ibx, 1);
-			$s->index_sync;
+			ok(run_script(['-index', $ibx->{inboxdir}]),
+				'indexed v1');
 		}
 	}
 
@@ -254,8 +252,8 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
 		$im->add($for_leafnode);
 		$im->done;
 		if ($version == 1) {
-			my $s = PublicInbox::SearchIdx->new($ibx, 1);
-			$s->index_sync;
+			ok(run_script(['-index', $ibx->{inboxdir}]),
+				'indexed v1');
 		}
 		my $hdr = $n->head("<$long_hdr>");
 		my $expect = qr/\AMessage-ID: /i . qr/\Q<$long_hdr>\E/;

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] t/nntpd: small fixes and cleanups
@ 2020-04-21  3:22  5% Eric Wong
  2020-04-21  3:22  7% ` [PATCH 2/3] t/nntpd: reduce dependencies on internal API Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-04-21  3:22 UTC (permalink / raw)
  To: meta

Eric Wong (3):
  t/nntpd: fix lsof check w/ TEST_RUN_MODE=0
  t/nntpd: reduce dependencies on internal API
  t/nntpd: die if we can't open stderr output

 t/nntpd.t | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)


^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-21  3:22  5% [PATCH 0/3] t/nntpd: small fixes and cleanups Eric Wong
2020-04-21  3:22  7% ` [PATCH 2/3] t/nntpd: reduce dependencies on internal API Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).