From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id EDmdD/PMJGczyQAAe85BDQ:P1 (envelope-from ) for ; Fri, 01 Nov 2024 12:43:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id EDmdD/PMJGczyQAAe85BDQ (envelope-from ) for ; Fri, 01 Nov 2024 13:43:31 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=aAGF+EWq; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=BP3HUdhC; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730465011; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kjB1cRhT5Fa/d7frksKoUHj5M0A5UTgy6EAvBKwtUlw=; b=YhWYPJ78V3jAJUWJo85XB+AD+lRHvfuhO7bBnaZz3cKOmE33AgblX9/SfTIx/x8wCo/Rny PGa3QjwUpdJO5cEJavTLA2fhhOLRI5sBdLa3csJCJjrJgdPI4boRd91/OpSO6rMgL7Mmmy uGPDGzGON4TY59TrpG+Mupl0M+hwFnrGao3EVLePykvMcpDdBUW8MIazGEedSIFqEHnpDo ONXA6CH5WTZI+Vdv7QrW3zKEEhiQWm0gO3lZghf/SdZekTI40c5BZoRBNWOWk+VE7q6FbG eZqrB1G6R8DHVQHA4nu/lvJqvJ2M6VNgTpeHB8mrsxptHQlzp4VR6bw++iyHlQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730465011; a=rsa-sha256; cv=none; b=b7b8QKmYlPu2puD/hW4hFJmmcryGygiFwbkwxqGEJlw6eFIn7pK1nBK7T4QMmiA215AtTs 4StiXYe4fONd90I9S8eJk5pkFnWLD7SFcUyk0Th5xWqmDIX48OeL4YCq9/Df7DwNh63fSd gcrrsl0wdAcfoHrEgEAmF83rMC3tdj78xdqISKcVPImBDp5UWtHo8V6P3C3IOfi5w3kZmk /6a/PyIU8KdyG+KmGn6qEBhAaMD1ePgdeBzvjRAITPj92CvJbuLc14ISij0SgiVZFILHHo yXTHLMTBzwJAUH0nIIqY/JriXEgL2mbLuzVXKqFcKWq/3a4D2XSxOqDCNZD/IQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=aAGF+EWq; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=BP3HUdhC; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A92CB56C2 for ; Fri, 01 Nov 2024 13:43:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6qzd-0007hJ-S6; Fri, 01 Nov 2024 08:43:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6qzc-0007gs-0t for guix-patches@gnu.org; Fri, 01 Nov 2024 08:43:08 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6qzb-0000S3-N4 for guix-patches@gnu.org; Fri, 01 Nov 2024 08:43:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=8UTuJuNh7k/I2ncvFzkLnyp0vTpfA5rcoq2DKqQOEaY=; b=aAGF+EWq9PrQS/cwlBO8eNLFZWXm120XuHSHkzlJKtCwZEwz1Xli+DkkYyiShhZKsXgeB7mPipxPCkhm2pwkzzQQB0g51L++xX4C/Fd8NHmdxiscVwlsLb1EUrcIVfDMFopWycG7vdwjgCKOnv4+JEj9COW8S7wZYMqLAts7Vi3Gd9L7DzgotwKw5ws9jzRwmHJ6Zvqylrnv5NYa4JJYkzoezz111YOGIUmobagczCea2VAq3g/Von+mxrxCkIgBeYEN9rV8BlCHr2QJx8GNjg+c1PfGNMLOpO7DgfWps1Cdtk++NRCJFV5k5bSXgebQFI27od95q4m8VjNLzinl1w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6qzb-0007w5-7A; Fri, 01 Nov 2024 08:43:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74151] [PATCH v2 8/9] tests: web: Add nginx+anonip test. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 01 Nov 2024 12:43:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74151 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74151@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer X-Debbugs-Original-Xcc: Maxim Cournoyer Received: via spool by 74151-submit@debbugs.gnu.org id=B74151.173046495430421 (code B ref 74151); Fri, 01 Nov 2024 12:43:07 +0000 Received: (at 74151) by debbugs.gnu.org; 1 Nov 2024 12:42:34 +0000 Received: from localhost ([127.0.0.1]:49228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6qz3-0007ub-Ht for submit@debbugs.gnu.org; Fri, 01 Nov 2024 08:42:34 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:59596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6qz0-0007u0-RJ for 74151@debbugs.gnu.org; Fri, 01 Nov 2024 08:42:31 -0400 Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-7db238d07b3so1515270a12.2 for <74151@debbugs.gnu.org>; Fri, 01 Nov 2024 05:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730464885; x=1731069685; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8UTuJuNh7k/I2ncvFzkLnyp0vTpfA5rcoq2DKqQOEaY=; b=BP3HUdhCnm3ZiZlmr7w1nWgK8ECxt9k8Uc/TViLlM4vC1MHJuHFO8EKLnFfP471GGT mqeCZJTUpvIvaCsW4f2s3LPPT+s5SVHa20t9cNV0JlNbEKWFgxfTVAcUkPS1OBuoHjcC 8j0DrKXpWsAy/0KwVC7X1iD6T/4D+lODBOGHrs0UaJrYPUyyeZoYlSt/Gp001YmCWHNI JXTK9LXNnxa4+6/IwPdifLPGsJisu8tqdOOknA31RCe1pj2KJLhwUMW/XhjOCrv9c90q nyQkRE3QcWtUYCFFUdRSfb349uLnVGVKKLdbQNlcfbudLma5QHqxhOn9RK65xxEUF4Ck FmBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730464885; x=1731069685; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8UTuJuNh7k/I2ncvFzkLnyp0vTpfA5rcoq2DKqQOEaY=; b=GEAnA+mNpbwrHUX5RzUlYmpFlVzFDPBYIykbUoFCaDW9y1s6dVt3sMcIkFoGKna0Ox T8i3awu/WW1fTJT9GdxbgdO1+X7mdp62W7eiHKh8HYVOOrOFZPIFAf9NR/LrjHmjaxy7 MD3XNbSXIkczhV/mqVFAbdvkqLvJWxJvmRlcgHSoVK8o3YNDqfMaCPUVIegq/KmLsISI pzfqYazb8roXHUVx5ownD2PYxLwyHxJ2snLTTZThQHJKsd5L+0jzF/sKD7gntVj91PKO 00t+zCQ3k8FU1YKFoGPlwmMSH1UBrgirP90aHSphPPNQq91wsv8m6hE/0a5LXSGlCzQK IazA== X-Gm-Message-State: AOJu0YztDgBIbi1HC8R7VTYKga8enqH7O0UfYdsDa3/w9Af2YKyoSeMY nLjq5t6x9mdHNTXeVHD932vG18wtDaCWU8H3CWN9/SaV+YX5WYKCzhbPbfCO X-Google-Smtp-Source: AGHT+IG/BE+0gTjT++uyt2z4nnv3JFJqEy0509Co6xGoCv8U/1OkoGXOzUJ1MGXYeTmYe8chdmyP0w== X-Received: by 2002:a17:90b:5201:b0:2e2:cc47:f1b0 with SMTP id 98e67ed59e1d1-2e8f0f53f3cmr24245977a91.3.1730464884765; Fri, 01 Nov 2024 05:41:24 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e92fa0ea9bsm4819463a91.10.2024.11.01.05.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 05:41:24 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 1 Nov 2024 21:39:28 +0900 Message-ID: <6099a6852bb8bdc693b273f3a7129767d8aabffc.1730464675.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <281a4773768a6c271ff464f473fdbc333a58c348.1730464675.git.maxim.cournoyer@gmail.com> References: <281a4773768a6c271ff464f473fdbc333a58c348.1730464675.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 6.81 X-Spam-Score: 6.81 X-Migadu-Queue-Id: A92CB56C2 X-Migadu-Scanner: mx13.migadu.com X-TUID: egM/CqjLk+KF This test reproduces the problem reported in bug #59181 ("[berlin] web services fail to start on reboot due to anonip"). * gnu/tests/web.scm (run-webserver-test) : New keyword argument. (%nginx+anonip-os, nginx-anonip-tests, %test-nginx+anonip): New variables. Change-Id: I7bbc8fb9f2ab33ce89bf1c0945d7ddbddf26a7ea --- New commit in v2 gnu/tests/web.scm | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index 6ef32138ed..33e0a697a8 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -50,6 +50,7 @@ (define-module (gnu tests web) #:use-module (ice-9 match) #:export (%test-httpd %test-nginx + %test-nginx+anonip %test-varnish %test-php-fpm %test-hpcguix-web @@ -91,9 +92,11 @@ (define retry-on-error (sleep delay) (loop (+ 1 attempt))))))))) -(define* (run-webserver-test name test-os #:key (log-file #f) (http-port 8080)) - "Run tests in %NGINX-OS, which has nginx running and listening on -HTTP-PORT." +(define* (run-webserver-test name test-os #:key (log-file #f) (http-port 8080) + extra-tests) + "Run tests in %NGINX-OS, which has nginx running and listening on HTTP-PORT. +EXTRA-TESTS should be a sexp of gexp containing extra code to run as part of +the tests." (define os (marionette-operating-system test-os @@ -154,6 +157,8 @@ (define* (run-webserver-test name test-os #:key (log-file #f) (http-port 8080)) marionette))) '()) + #$extra-tests + (test-end)))) (gexp->derivation (string-append name "-test") test)) @@ -209,6 +214,38 @@ (define %test-nginx (value (run-webserver-test name %nginx-os #:log-file "/var/log/nginx/access.log")))) +(define %nginx+anonip-os + (simple-operating-system + (service dhcp-client-service-type) + (service anonip-service-type + (anonip-configuration + (input "/var/run/anonip/access.log") + (output "/var/log/anonip/access.log") + (debug? #t))) + (service nginx-service-type + (nginx-configuration + (log-directory "/var/run/anonip/") + (server-blocks %nginx-servers) + (shepherd-requirement '(anonip-/var/log/anonip/access.log)))) + (simple-service 'make-http-root activation-service-type + %make-http-root))) + +(define nginx-anonip-tests + #~(test-assert "anonip service is running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (wait-for-service 'anonip-/var/log/anonip/access.log)) + marionette))) + +(define %test-nginx+anonip + (system-test + (name "nginx+anonip") + (description "Run a NGINX server with logs anonymized by Anonip") + (value (run-webserver-test "nginx" %nginx+anonip-os + #:log-file "/var/log/anonip/access.log" + #:extra-tests nginx-anonip-tests)))) + ;;; ;;; Varnish -- 2.46.0