From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 07A401F6A9 for ; Fri, 4 Jan 2019 13:10:41 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/6] t/cgi.t: eliminate some cruft and unnecessary tests Date: Fri, 4 Jan 2019 13:10:33 +0000 Message-Id: <20190104131038.32233-2-e@80x24.org> In-Reply-To: <20190104131038.32233-1-e@80x24.org> References: <20190104131038.32233-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: More of this test will be, we use PSGI nowadays; and most of these tests can be ported over to use PSGI and not fork+exec as much. --- t/cgi.t | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/t/cgi.t b/t/cgi.t index d92749b..ac2c69f 100644 --- a/t/cgi.t +++ b/t/cgi.t @@ -48,9 +48,8 @@ my $im = PublicInbox::Import->new($git, 'test', $addr); { local $ENV{HOME} = $home; - # ensure successful message delivery - { - my $mime = Email::MIME->new(<new(< To: You Cc: $addr @@ -60,15 +59,10 @@ Date: Thu, 01 Jan 1970 00:00:00 +0000 zzzzzz EOF - $im->add($mime); - $im->done; - my $rev = `git --git-dir=$maindir rev-list HEAD`; - like($rev, qr/\A[a-f0-9]{40}/, "good revision committed"); - } + $im->add($mime); # deliver a reply, too - { - my $reply = Email::MIME->new(<new(< To: Me Cc: $addr @@ -82,12 +76,8 @@ Me wrote: what? EOF - $im->add($reply); - $im->done; - my $rev = `git --git-dir=$maindir rev-list HEAD`; - like($rev, qr/\A[a-f0-9]{40}/, "good revision committed"); - } - + $im->add($reply); + $im->done; } # obvious failures, first @@ -118,7 +108,7 @@ EOF like($res->{head}, qr/Status:\s*206/i, "info/refs partial past end OK"); is($res->{body}, substr($orig, 5), 'partial body OK past end'); } -use Data::Dumper; + # atom feeds { local $ENV{HOME} = $home; -- EW