From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0BpSGF2kY2QbCAAASxT56A (envelope-from ) for ; Tue, 16 May 2023 17:42:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EE06GF2kY2QKYQAAauVa8A (envelope-from ) for ; Tue, 16 May 2023 17:42:21 +0200 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 24F5E381F2 for ; Tue, 16 May 2023 17:42:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pywoN-0005Wc-51; Tue, 16 May 2023 11:42:03 -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 1pywoM-0005Uv-0q for guix-patches@gnu.org; Tue, 16 May 2023 11:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pywoL-00017N-OY for guix-patches@gnu.org; Tue, 16 May 2023 11:42:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pywoL-0002l3-Hg for guix-patches@gnu.org; Tue, 16 May 2023 11:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63538] [PATCH 2/3] tests: Check for service existence in MODIFY-SERVICES Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 May 2023 15:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63538 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63538@debbugs.gnu.org Cc: Brian Cully Received: via spool by 63538-submit@debbugs.gnu.org id=B63538.168425171410581 (code B ref 63538); Tue, 16 May 2023 15:42:01 +0000 Received: (at 63538) by debbugs.gnu.org; 16 May 2023 15:41:54 +0000 Received: from localhost ([127.0.0.1]:47012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pywoE-0002kV-HJ for submit@debbugs.gnu.org; Tue, 16 May 2023 11:41:54 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:64233 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pywoC-0002kL-0T for 63538@debbugs.gnu.org; Tue, 16 May 2023 11:41:52 -0400 Received: from psyduck.jhoto.kublai.com (ool-18b8e9e7.dyn.optonline.net [24.184.233.231]) by mail.spork.org (Postfix) with ESMTPSA id CA9F4A5B2; Tue, 16 May 2023 11:41:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1684251711; bh=ikE1xPgGYduWuSPJH+JWsPYbaanAKw81Oosrc+MuUeM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jugEo8KMCirYetYWTYfFaaNNV41FrNvad2+1pv2CmzV3x0269E8ypO36eH08W7EYA 2oKSDHLyyyHD0rKFEzdQToZfp+6iiaCv0RG/3pemvYpavuwwJKMpggV61KMGihSFwG DR6P+LOkwVWDsgqn6LQC8k5SNbmssXiuPKONRopo= Date: Tue, 16 May 2023 11:41:41 -0400 Message-Id: <4de40059943bdd7fa6cc45a70a9cd1087edad57d.1684251702.git.bjc@spork.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <999ea3ff3ea32e4e1bb8b7b8abd4e0e29d1f2395.1684251702.git.bjc@spork.org> References: <999ea3ff3ea32e4e1bb8b7b8abd4e0e29d1f2395.1684251702.git.bjc@spork.org> 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: , Reply-to: Brian Cully X-ACL-Warn: , Brian Cully via Guix-patches From: Brian Cully via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684251741; a=rsa-sha256; cv=none; b=iJBkkzeUDX/Pk354yKOiF2HAfdHhCwYZxpwLd9MWU5H8uYinU0FeGfl1VscrbKvz32MaQI r9Ym7kkyMFZrykRYjwqPDpnYCXMOFjMizdF1m+SvN+fJTZBrdl0+tfvVER7Z/x1yJ/SuXe mrei1oUmGWK9NDJLCDI+3FWK5HRkgykCL8doe0Yuvbu3nZYalPlhS/MctU4sxMPvKN9WeZ iVyfFbzaGmQbRZBa6pJJxXwhivx9mQ9zc9LVGlBwmNHPXM9AUda5de9XII2o9QQzLuFkWT YRGqh3Gf0OThcGRKTqn4+X+HnlRJNB6mugeBJ6JVyS/NBB/cTvK6ukaQ78vtNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=jugEo8KM; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684251741; h=from:from:sender:sender:reply-to: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=FvodYQ0+W0/9rCCTcObmTg5aFeGa7I45hE67IPqzyYA=; b=LWF7TIvCVjkHbhbzw+WCDEdD04vkWBbJQhJTS7aOyM083g7N4mIDzSusStwAFw9MbQyFtb AYzAaYWOJ+FNtc8DV8u7p8puUkmx0y9g6YUlKZ4QYkvEozlWRGJKFYba0ZS9YHGX/B6z64 accyn+ZUIj8gJdjxEulmFLiVYWCUGJLoVnKH1WVsJRwA6jCsAtoHMGLqgVA4CywBWftdRh qZEvFAXYPeLkQ/lW/0KikJ2zcvHirqdVmQ63t2kqLcoUc0Q6aOpAtPyggUmN7bwIhPkZnM jKMRWFX5/y64eIxhgrWONrKz06wgI4+aCVlJEHGp8XGhImMP/KqaSpS92iJMmQ== X-Migadu-Spam-Score: -4.49 X-Spam-Score: -4.49 X-Migadu-Queue-Id: 24F5E381F2 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=jugEo8KM; dmarc=pass (policy=none) header.from=gnu.org; 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" X-TUID: RvGs7VLuifSA * tests/services.scm ("modify-services: delete non-existing service") ("modify-services: change value for non-existing service"): New tests. --- tests/services.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/services.scm b/tests/services.scm index 435f39e59b..5a9cd47489 100644 --- a/tests/services.scm +++ b/tests/services.scm @@ -319,6 +319,21 @@ (define-module (test-services) (delete t2))) <))) +(test-error "modify-services: delete non-existing service" + #t + (let* ((t1 (service-type (name 't1) + (extensions '()) + (description ""))) + (t2 (service-type (name 't2) + (extensions '()) + (description ""))) + (t3 (service-type (name 't2) + (extensions '()) + (description ""))) + (services (list (service t1 1) (service t2 2)))) + (modify-services services + (delete t3)))) + (test-equal "modify-services: change value" '(1 2 33) (let* ((t1 (service-type (name 't1) @@ -336,4 +351,20 @@ (define-module (test-services) (t3 value => 33))) <))) +(test-error "modify-services: change value for non-existing service" + #t + (let* ((t1 (service-type (name 't1) + (extensions '()) + (description ""))) + (t2 (service-type (name 't2) + (extensions '()) + (description ""))) + (t3 (service-type (name 't3) + (extensions '()) + (description ""))) + (services (list (service t1 1) (service t3 3)))) + (map service-value + (modify-services services + (t2 value => 22))))) + (test-end) -- 2.40.1