From patchwork Thu Jan 20 13:08:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 36645 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D1F5427BBEA; Thu, 20 Jan 2022 18:04:03 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 82CD227BBE9 for ; Thu, 20 Jan 2022 18:04:03 +0000 (GMT) Received: from localhost ([::1]:44618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAbn0-0000Lt-LZ for patchwork@mira.cbaines.net; Thu, 20 Jan 2022 13:04:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAXCX-0004EL-At for guix-patches@gnu.org; Thu, 20 Jan 2022 08:10:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAXCW-0006UP-Ks for guix-patches@gnu.org; Thu, 20 Jan 2022 08:10:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nAXCW-0004tO-GA for guix-patches@gnu.org; Thu, 20 Jan 2022 08:10:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53389] [PATCH 9/9] tests/challenge: Do not hard code HTTP ports. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Jan 2022 13:10:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53389 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53389@debbugs.gnu.org Cc: ludo@gnu.org, Maxime Devos Received: via spool by 53389-submit@debbugs.gnu.org id=B53389.164268415918702 (code B ref 53389); Thu, 20 Jan 2022 13:10:04 +0000 Received: (at 53389) by debbugs.gnu.org; 20 Jan 2022 13:09:19 +0000 Received: from localhost ([127.0.0.1]:56704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAXBn-0004rU-2u for submit@debbugs.gnu.org; Thu, 20 Jan 2022 08:09:19 -0500 Received: from baptiste.telenet-ops.be ([195.130.132.51]:42104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAXBN-0004p1-0b for 53389@debbugs.gnu.org; Thu, 20 Jan 2022 08:08:55 -0500 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id l18q2600H4UW6Th0118sP7; Thu, 20 Jan 2022 14:08:52 +0100 From: Maxime Devos Date: Thu, 20 Jan 2022 13:08:49 +0000 Message-Id: <20220120130849.292178-9-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220120130849.292178-1-maximedevos@telenet.be> References: <20220120130849.292178-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642684132; bh=QOnbiZkDGAC6xGcsNPZP8KQQOf8C713hLl+2UHDyN8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hHzl58paTOa3m80X/OlSozvUm7INhCPR2YKK18EdRzb+nKZH9giYVNwx0eXN8ykkT PYhG4PGu/tO1aKD7s01s3TbYT0mYRcES2ThGYCelh9ev2zTKINuJNOXQh4ORrf6nAu rdd8jio+eKi+jfMsY7bjKFDgP8YzmNH4SGDcOl9QCGEMCsNFNmhoHieLxt6DJjpz6Y /DrIyh70V6896YJsPr4MLfoG2H93XyN2IK908U8yPpmwX3acCWmJbkvMwaxGKZxVLw DxWgp0Q4iYtbM/WiMkr/J52C4SiRumvu8CscOqk2vB7RgoVbv+Mt85JlmsyyPMXgFb rFpMkta8ZJJ6Q== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This is a follow-up to commit 4aea90b1876179aab8d603a42533a6bdf97ccd3c. * tests/challenge.scm (call-mismatch-test): Set %http-server-port to 0 instead of 9001. Remove the first parametrisation of %http-server-port as it was unnecessary. Adjust calls to %local-url to use the right port number. --- tests/challenge.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/challenge.scm b/tests/challenge.scm index c9de33ed34..2807b4fa00 100644 --- a/tests/challenge.scm +++ b/tests/challenge.scm @@ -198,16 +198,16 @@ value." (nar2 -> (call-with-bytevector-output-port (lambda (port) (write-file out2 port))))) - (parameterize ((%http-server-port 9000)) - (with-http-server/keep-lingering - `((200 ,(make-narinfo item size1 hash1)) - (200 ,nar1)) - (parameterize ((%http-server-port 9001)) + (with-http-server/keep-lingering + `((200 ,(make-narinfo item size1 hash1)) + (200 ,nar1)) + (let ((port1 (%http-server-port))) + (parameterize ((%http-server-port 0)) (with-http-server/keep-lingering `((200 ,(make-narinfo item size2 hash2)) (200 ,nar2)) - (mlet* %store-monad ((urls -> (list (%local-url 9000) - (%local-url 9001))) + (mlet* %store-monad ((urls -> (list (%local-url port1) + (%local-url))) (reports (compare-contents (list item) urls))) (return (proc (car reports))))))))))))