From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yIfVKhpvbWcVPAEAqHPOHw:P1 (envelope-from ) for ; Thu, 26 Dec 2024 14:58:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yIfVKhpvbWcVPAEAqHPOHw (envelope-from ) for ; Thu, 26 Dec 2024 15:58:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=sEsAIfu3; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=EJ+T8A90; 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), DKIM not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735225114; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=exVBHusDyqCG7kjQcCwetnlWDouqImLA2yplAH3Tk1E=; b=QkUKD4ENVo5uw/9C2YbqZEeN4u/EiO3NoUCXj7IizKAXoFxVuWXHH5s7zdjP7dSuDhU1x4 c/hXMgxaiGCQBf9Sune/Zl6C3HkaRuvlukO/Uml99+AfNdyN65RYyltrDjrQNyzE0BdkJF o78Uj+E44ql2rQjmE+epAQSs+V3UuCnQZsGIPnp+dbNV0+Hbb7fvnwrlp14/MyovERBhLt 3xiHuG5PnBUiRarSLHt27Gnf9IRR46/xT8+S0Nvix3AgHK6ZuGG6DC0ViDJ8FzPnATkTNf YFGtx1eFAc/S+KBVFn4le9/cLRkhqVvCI9wC6HJrdHt0lMmB7GCSW9JOyRwuug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=sEsAIfu3; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=EJ+T8A90; 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), DKIM not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735225114; a=rsa-sha256; cv=none; b=MlR0aS/Vzl1PVjgGX/IhSglNAtYP+SdJBSfvdkGAP5HQZ2yKvctiv+BTtRXaV3KdNow+lv r0brwmwdQhYsWnF89R8V+f9ND8jZi+xW9NKJbY0233sXAo1jmk4mbMEj6Ut25Rl7rhaHD5 7HVaqeHrsc90UDtBzXyJbZwR/5BsobJTiPg23q00WtLeW9AVivqWSIhFaB8GE4/35hEf+0 RlSJuVV4bfHJ+QIz9/toN+r/i4lxdGcBdSIuT4BXH5v2LmxRD6DjoR+xZjYXQ9zSOviiEq gZDbEQ9Kn+FQuUqIV2M4TdeenpU4fe4bCepsUA/rEamA6NjgWA5GpsvF8DY6eA== 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 3B4738B259 for ; Thu, 26 Dec 2024 15:58:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQpJL-0007oi-Q3; Thu, 26 Dec 2024 09:58:03 -0500 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 1tQpJK-0007oS-Bs for guix-patches@gnu.org; Thu, 26 Dec 2024 09:58:02 -0500 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 1tQpJK-00047q-3I for guix-patches@gnu.org; Thu, 26 Dec 2024 09:58:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=exVBHusDyqCG7kjQcCwetnlWDouqImLA2yplAH3Tk1E=; b=sEsAIfu3AcCfClhD87jLo64rRPvn1IcW0SWe+MSzl1DFb1UFaEpT9nnUda6A+0nkuPjBIz++COuZlV5U+O29C4es0vglJhexly5/NkMDa/hwCu0+LTadvA3zaSfYEKwPentDsOJpRtw4JSyzJnthI0pBfF1sS+Y4ARUUWigMHyY5sK1AxwQSPf8mRrKiNflk1tbumSL1+WPauuWwq/+XqZpam433egqKPFUP4N1hbtt0rllfRdni3oKgspxQZ+jNk4wQA6aaIfTfZvIxZTWNERl/7iaZhXa+yrSpEzige4Edik3YHoRMSs/fDD5Lkv4IvCGlwwuWtNYjsXQp2ONIkA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQpJJ-0002F2-Ug for guix-patches@gnu.org; Thu, 26 Dec 2024 09:58:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75118] [PATCH Cuirass] tests: Test properties in specifications. Resent-From: Romain GARBAGE Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Dec 2024 14:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75118 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75118@debbugs.gnu.org Cc: ludovic.courtes@inria.fr, Romain GARBAGE X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17352250648570 (code B ref -1); Thu, 26 Dec 2024 14:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Dec 2024 14:57:44 +0000 Received: from localhost ([127.0.0.1]:41845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQpJ1-0002E6-IT for submit@debbugs.gnu.org; Thu, 26 Dec 2024 09:57:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:46974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQpIz-0002Dx-0y for submit@debbugs.gnu.org; Thu, 26 Dec 2024 09:57:42 -0500 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 1tQpIy-0007lZ-Oo for guix-patches@gnu.org; Thu, 26 Dec 2024 09:57:40 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQpIw-00046s-3i for guix-patches@gnu.org; Thu, 26 Dec 2024 09:57:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=exVBHusDyqCG7kjQcCwetnlWDouqImLA2yplAH3Tk1E=; b=EJ+T8A90nZ4P+5riUCDkFhk3f5aY+Sg2980Bkx4ZBJmrw4kwvc5nBjR/ U9cSqG3u6VjIfUbxXH8R8gO4qTPg+6TvIslqky3eW2CiCZN8IAl4HRWlL dWSxZeQOsXiV83NFtQHdmOSeajZl73FJzqPnnoDotlKO2+nolF41IT65d 0=; X-IronPort-AV: E=Sophos;i="6.12,266,1728943200"; d="scan'208";a="200789197" Received: from 91-160-179-8.subs.proxad.net (HELO localhost.localdomain) ([91.160.179.8]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Dec 2024 15:57:35 +0100 From: Romain GARBAGE Date: Thu, 26 Dec 2024 15:57:34 +0100 Message-ID: <20241226145734.15331-1-romain.garbage@inria.fr> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.83; envelope-from=romain.garbage@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 1.13 X-Spam-Score: 1.13 X-Migadu-Queue-Id: 3B4738B259 X-TUID: RInJ1c4Yi/ax * tests/common.scm (specifications=?): Add testing of the properties field. * tests/forgejo.scm (default-pull-request-json): Add missing fields. (test): Add properties to expected specification. * tests/gitlab.scm (default-mr-json, custom-mr-json, custom-mr-json-multiple-packages, custom-mr-json-name-prefix, custom-mr-json-build-all): Fix iid type. Add missing fields. Improve coherency of values. (tests): Add properties to expected specifications. --- tests/common.scm | 4 ++- tests/forgejo.scm | 13 +++++++-- tests/gitlab.scm | 71 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 66 insertions(+), 22 deletions(-) diff --git a/tests/common.scm b/tests/common.scm index 488d8db..479fef3 100644 --- a/tests/common.scm +++ b/tests/common.scm @@ -148,4 +148,6 @@ Return the socket on success and #f on failure." (equal? (map channel-branch (specification-channels spec1)) (map channel-branch - (specification-channels spec2))))) + (specification-channels spec2))) + (equal? (specification-properties spec1) + (specification-properties spec2)))) diff --git a/tests/forgejo.scm b/tests/forgejo.scm index 62b22c6..2718bb3 100644 --- a/tests/forgejo.scm +++ b/tests/forgejo.scm @@ -47,7 +47,8 @@ \"sha\": \"666af40e8a059fa05c7048a7ac4f2eccbbd0183b\", \"repo\": { \"name\": \"project-name\", - \"clone_url\": \"https://forgejo.instance.test/base-repo/project-name.git\" + \"clone_url\": \"https://forgejo.instance.test/base-repo/project-name.git\", + \"html_url\": \"https://forgejo.instance.test/base-repo/project-name\" } }, \"head\": { @@ -56,7 +57,8 @@ \"sha\": \"582af40e8a059fa05c7048a7ac4f2eccbbd0183b\", \"repo\": { \"name\": \"fork-name\", - \"clone_url\": \"https://forgejo.instance.test/source-repo/fork-name.git\" + \"clone_url\": \"https://forgejo.instance.test/source-repo/fork-name.git\", + \"html_url\": \"https://forgejo.instance.test/source-repo/fork-name\" } } } @@ -78,4 +80,9 @@ %default-channels)) (priority %default-jobset-options-priority) (period %default-jobset-options-period) - (systems %default-jobset-options-systems)))) + (systems %default-jobset-options-systems) + (properties '((forge-type . forgejo) + (pull-request-url . "https://forgejo.instance.test/base-repo/pulls/1") + (pull-request-number . 1) + (pull-request-target-repository-name . project-name) + (pull-request-target-repository-home-page . "https://forgejo.instance.test/base-repo/project-name")))))) diff --git a/tests/gitlab.scm b/tests/gitlab.scm index 6df2af3..7d24a6a 100644 --- a/tests/gitlab.scm +++ b/tests/gitlab.scm @@ -44,7 +44,7 @@ \"object_attributes\": { \"action\": \"open\", \"merge_status\": \"can_be_merged\", - \"iid\": \"1\", + \"iid\": 1, \"source_branch\": \"test-branch\", \"source\": { \"git_http_url\": \"https://gitlab.instance.test/source-repo/fork-name.git\", @@ -52,11 +52,11 @@ \"name\": \"test-project\" }, \"target\": { - \"git_http_url\": \"https://gitlab.instance.test/source-repo/project-name.git\", - \"homepage\": \"https://gitlab.instance.test/source-repo/project-name\", + \"git_http_url\": \"https://gitlab.instance.test/target-repo/project-name.git\", + \"homepage\": \"https://gitlab.instance.test/target-repo/project-name\", \"name\": \"project-name\" }, - \"url\": \"https://gitlab.instance.test/source-repo/-/merge_requests/1\" + \"url\": \"https://gitlab.instance.test/target-repo/-/merge_requests/1\" } }") @@ -69,16 +69,19 @@ \"object_attributes\": { \"action\": \"open\", \"merge_status\": \"can_be_merged\", - \"iid\": \"2\", + \"iid\": 2, \"source_branch\": \"test-branch\", \"source\": { \"git_http_url\": \"https://gitlab.instance.test/source-repo/fork-name.git\", + \"homepage\": \"https://gitlab.instance.test/source-repo/project-name\", \"name\": \"test-project\" }, \"target\": { - \"git_http_url\": \"https://gitlab.instance.test/source-repo/project-name.git\", + \"git_http_url\": \"https://gitlab.instance.test/target-repo/project-name.git\", + \"homepage\": \"https://gitlab.instance.test/target-repo/project-name\", \"name\": \"project-name\" }, + \"url\": \"https://gitlab.instance.test/target-repo/-/merge_requests/2\", \"cuirass\": { \"period\": 25, \"priority\": 3, @@ -104,16 +107,19 @@ \"object_attributes\": { \"action\": \"open\", \"merge_status\": \"can_be_merged\", - \"iid\": \"1\", + \"iid\": 1, \"source_branch\": \"test-branch\", \"source\": { \"git_http_url\": \"https://gitlab.instance.test/source-repo/fork-name.git\", + \"homepage\": \"https://gitlab.instance.test/source-repo/project-name\", \"name\": \"test-project\" }, \"target\": { - \"git_http_url\": \"https://gitlab.instance.test/source-repo/project-name.git\", + \"git_http_url\": \"https://gitlab.instance.test/target-repo/project-name.git\", + \"homepage\": \"https://gitlab.instance.test/target-repo/project-name\", \"name\": \"project-name\" }, + \"url\": \"https://gitlab.instance.test/target-repo/-/merge_requests/1\", \"cuirass\": { \"build\": { \"packages\": [ @@ -135,16 +141,19 @@ \"object_attributes\": { \"action\": \"open\", \"merge_status\": \"can_be_merged\", - \"iid\": \"1\", + \"iid\": 1, \"source_branch\": \"test-branch\", \"source\": { \"git_http_url\": \"https://gitlab.instance.test/source-repo/fork-name.git\", + \"homepage\": \"https://gitlab.instance.test/source-repo/project-name\", \"name\": \"test-project\" }, \"target\": { - \"git_http_url\": \"https://gitlab.instance.test/source-repo/project-name.git\", + \"git_http_url\": \"https://gitlab.instance.test/target-repo/project-name.git\", + \"homepage\": \"https://gitlab.instance.test/target-repo/project-name\", \"name\": \"project-name\" }, + \"url\": \"https://gitlab.instance.test/target-repo/-/merge_requests/1\", \"cuirass\": { \"name_prefix\": \"prefix\" } @@ -160,7 +169,7 @@ \"object_attributes\": { \"action\": \"open\", \"merge_status\": \"can_be_merged\", - \"iid\": \"2\", + \"iid\": 2, \"source_branch\": \"test-branch\", \"source\": { \"git_http_url\": \"https://gitlab.instance.test/source-repo/fork-name.git\", @@ -168,10 +177,11 @@ \"name\": \"test-project\" }, \"target\": { - \"git_http_url\": \"https://gitlab.instance.test/source-repo/project-name.git\", - \"homepage\": \"https://gitlab.instance.test/source-repo/project-name\", + \"git_http_url\": \"https://gitlab.instance.test/target-repo/project-name.git\", + \"homepage\": \"https://gitlab.instance.test/target-repo/project-name\", \"name\": \"project-name\" }, + \"url\": \"https://gitlab.instance.test/target-repo/-/merge_requests/2\", \"cuirass\": { \"period\": 25, \"priority\": 3, @@ -201,7 +211,12 @@ %default-channels)) (priority %default-jobset-options-priority) (period %default-jobset-options-period) - (systems %default-jobset-options-systems)))) + (systems %default-jobset-options-systems) + (properties '((forge-type . gitlab) + (pull-request-url . "https://gitlab.instance.test/target-repo/-/merge_requests/1") + (pull-request-number . 1) + (pull-request-target-repository-name . project-name) + (pull-request-target-repository-home-page . "https://gitlab.instance.test/target-repo/project-name")))))) (test-assert "custom-json" (specifications=? @@ -221,7 +236,12 @@ (priority 3) (period 25) (systems (list "x86_64-linux" - "aarch64-linux"))))) + "aarch64-linux")) + (properties '((forge-type . gitlab) + (pull-request-url . "https://gitlab.instance.test/target-repo/-/merge_requests/2") + (pull-request-number . 2) + (pull-request-target-repository-name . project-name) + (pull-request-target-repository-home-page . "https://gitlab.instance.test/target-repo/project-name")))))) (test-assert "custom-json-multiple-packages" (specifications=? @@ -240,7 +260,12 @@ %default-channels)) (priority %default-jobset-options-priority) (period %default-jobset-options-period) - (systems %default-jobset-options-systems)))) + (systems %default-jobset-options-systems) + (properties '((forge-type . gitlab) + (pull-request-url . "https://gitlab.instance.test/target-repo/-/merge_requests/1") + (pull-request-number . 1) + (pull-request-target-repository-name . project-name) + (pull-request-target-repository-home-page . "https://gitlab.instance.test/target-repo/project-name")))))) (test-assert "custom-json-name-prefix" (specifications=? @@ -259,7 +284,12 @@ %default-channels)) (priority %default-jobset-options-priority) (period %default-jobset-options-period) - (systems %default-jobset-options-systems)))) + (systems %default-jobset-options-systems) + (properties '((forge-type . gitlab) + (pull-request-url . "https://gitlab.instance.test/target-repo/-/merge_requests/1") + (pull-request-number . 1) + (pull-request-target-repository-name . project-name) + (pull-request-target-repository-home-page . "https://gitlab.instance.test/target-repo/project-name")))))) (test-assert "custom-json-build-all" (specifications=? @@ -279,4 +309,9 @@ (priority 3) (period 25) (systems (list "x86_64-linux" - "aarch64-linux"))))) + "aarch64-linux")) + (properties '((forge-type . gitlab) + (pull-request-url . "https://gitlab.instance.test/target-repo/-/merge_requests/2") + (pull-request-number . 2) + (pull-request-target-repository-name . project-name) + (pull-request-target-repository-home-page . "https://gitlab.instance.test/target-repo/project-name")))))) base-commit: 774113d13bf6df5bc5d8c5b409ad51add91f4013 -- 2.46.0