user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/3] t/init: fix test when ~/.public-inbox/ does not exist
  2020-07-29  8:43  4% [PATCH 0/3] test fixes Eric Wong
@ 2020-07-29  8:43  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-07-29  8:43 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

From: Eric Wong <e@80x24.org>

We'll just set the documented PI_EMERGENCY env to
a writable location.
---
 t/init.t | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/t/init.t b/t/init.t
index 16581955..6211bb58 100644
--- a/t/init.t
+++ b/t/init.t
@@ -66,6 +66,7 @@ SKIP: {
 	require_git(2.6, 1) or skip "git 2.6+ required", 2;
 	use_ok 'PublicInbox::Msgmap';
 	local $ENV{PI_DIR} = "$tmpdir/.public-inbox/";
+	local $ENV{PI_EMERGENCY} = "$tmpdir/.public-inbox/emergency";
 	my $cfgfile = "$ENV{PI_DIR}/config";
 	my $cmd = [ '-init', '-V2', 'v2list', "$tmpdir/v2list",
 		   qw(http://example.com/v2list v2list@example.com) ];
@@ -123,6 +124,7 @@ SKIP: {
 	my $msg = "Message-ID: <$mid>\n\n";
 	my $rdr = { 0 => \$msg, 2 => \(my $err = '')  };
 	ok(run_script([qw(-mda --no-precheck)], $env, $rdr), 'deliver V1');
+	diag "err=$err" if $err;
 	my $mm = PublicInbox::Msgmap->new_file("$tmpdir/skip3/msgmap.sqlite3");
 	my $n = $mm->num_for($mid);
 	is($n, 13, 'V2 NNTP article numbers skipped via --skip-artnum');
@@ -132,7 +134,9 @@ SKIP: {
 	$cmd = [ qw(-init -V1 -N12 -Lmedium skip4), "$tmpdir/skip4",
 		   qw(http://example.com/skip4), $addr ];
 	ok(run_script($cmd), '--skip-artnum -V1');
+	$err = '';
 	ok(run_script([qw(-mda --no-precheck)], $env, $rdr), 'deliver V1');
+	diag "err=$err" if $err;
 	$mm = PublicInbox::Msgmap->new("$tmpdir/skip4");
 	$n = $mm->num_for($mid);
 	is($n, 13, 'V1 NNTP article numbers skipped via --skip-artnum');

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] test fixes
@ 2020-07-29  8:43  4% Eric Wong
  2020-07-29  8:43  7% ` [PATCH 2/3] t/init: fix test when ~/.public-inbox/ does not exist Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-07-29  8:43 UTC (permalink / raw)
  To: meta

Some new features had tests which failed on new VMs.

Eric Wong (3):
  t/imap_searchqp: fix test dependencies
  t/init: fix test when ~/.public-inbox/ does not exist
  emergency: create full path to PI_EMERGENCY

 lib/PublicInbox/Emergency.pm | 6 ++++--
 t/imap_searchqp.t            | 3 ++-
 t/init.t                     | 4 ++++
 3 files changed, 10 insertions(+), 3 deletions(-)

^ permalink raw reply	[relevance 4%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-07-29  8:43  4% [PATCH 0/3] test fixes Eric Wong
2020-07-29  8:43  7% ` [PATCH 2/3] t/init: fix test when ~/.public-inbox/ does not exist 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).