From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2202F1F542 for ; Wed, 21 Jun 2023 10:16:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1687342617; bh=EDPH74/CmvnCFi+/D0VIwqpRAXXj7BmYRX7PmpHixmU=; h=From:To:Subject:Date:From; b=5i5b8NDbonRSmNyoPpceggyLeSj7t1/zOaBU+oQ+vqDg5/plkGj80BHZy45N58rJy 4CvX7zDwUD1XCOBAQuqyi4VOANdbgI91L/0mltoLiGmghjsyfwfm3dag3bSzANNOYN n+Z6N34Jiq2KRHR4ruQocYHSVTVaucT0nkGqK9wo= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/solver_git: drop needless `use' and Plack deps Date: Wed, 21 Jun 2023 10:16:57 +0000 Message-Id: <20230621101657.459944-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: `lei (blob|rediff)' works without Plack installed, so don't put a dependency on Plack or anything related to HTTP aside from the URI module which we use everywhere. This only enables testing the solver component on systems without Plack (as the actual lei functionality has always worked without Plack). --- t/solver_git.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/solver_git.t b/t/solver_git.t index 9396b7a1..c210c1ee 100644 --- a/t/solver_git.t +++ b/t/solver_git.t @@ -1,14 +1,14 @@ #!perl -w # Copyright (C) all contributors # License: AGPL-3.0+ -use strict; -use v5.10.1; +use v5.12; use PublicInbox::TestCommon; use Cwd qw(abs_path); -require_git(2.6); +require_git v2.6; use PublicInbox::ContentHash qw(git_sha); use PublicInbox::Spawn qw(popen_rd); -require_mods(qw(DBD::SQLite Search::Xapian Plack::Util)); +require_mods(qw(DBD::SQLite Search::Xapian URI::Escape)); +require PublicInbox::SolverGit; my $rdr = { 2 => \(my $null) }; my $git_dir = xqx([qw(git rev-parse --git-common-dir)], undef, $rdr); $git_dir = xqx([qw(git rev-parse --git-dir)], undef, $rdr) if $? != 0; @@ -18,7 +18,6 @@ chomp $git_dir; # needed for alternates, and --absolute-git-dir is only in git 2.13+ $git_dir = abs_path($git_dir); -use_ok "PublicInbox::$_" for (qw(Inbox V2Writable Git SolverGit WWW)); my $patch2 = eml_load 't/solve/0002-rename-with-modifications.patch'; my $patch2_oid = git_sha(1, $patch2)->hexdigest; @@ -209,10 +208,11 @@ my $hinted = $res; shift @$res; shift @$hinted; is_deeply($res, $hinted, 'hints work (or did not hurt :P'); -my @psgi = qw(HTTP::Request::Common Plack::Test URI::Escape Plack::Builder); +my @psgi = qw(HTTP::Request::Common Plack::Test Plack::Builder); SKIP: { require_mods(@psgi, 7 + scalar(@psgi)); use_ok($_) for @psgi; + require PublicInbox::WWW; my $binfoo = "$ibx->{inboxdir}/binfoo.git"; my $l = "$ibx->{inboxdir}/inbox.lock"; -f $l or BAIL_OUT "BUG: $l missing: $!";