guix/tests
Brian Cully f66fa5f917
gnu: services: Revert to deleting and updating all matching services
This patch reverts the behavior introduced in
1819512073 which caused ‘modify-services’
clauses to only match a single instance of a service.

We will now match all service instances when doing a deletion or update, while
still raising an exception when trying to match against a service that does
not exist in the services list, or which was deleted explicitly by a ‘delete’
clause (or an update clause that returns ‘#f’ for the service).

Fixes: #64106

* gnu/services.scm (%modify-services): New procedure.
(modify-services): Use it.
(apply-clauses): Add DELETED-SERVICES argument, change to modify one service
at a time.
* tests/services.scm
("modify-services: delete then modify")
("modify-services: modify then delete")
("modify-services: delete multiple services of the same type")
("modify-services: modify multiple services of the same type"): New tests.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-08-31 23:31:50 -04:00
..
keys
services services: Add pam-mount-volume-service-type. 2023-08-10 09:26:08 +02:00
accounts.scm accounts: Delete duplicate entries. 2019-08-28 00:27:14 +02:00
base16.scm
base32.scm build: Remove references to the 'nix-hash' program. 2020-08-29 16:24:17 +02:00
base64.scm substitute-binary: Support the Signature field of a narinfo file. 2014-03-30 12:02:10 +02:00
boot-parameters.scm tests: Add test for menu-entry roundtrips as sexps. 2022-08-28 23:37:28 +02:00
bournish.scm
build-emacs-utils.scm tests: build-emacs-utils: Allow test to pass on Emacs 27 too. 2022-07-13 10:49:40 -04:00
build-utils.scm utils: Fix wrap-script argument handling. 2022-01-10 11:44:29 -05:00
builders.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
cache.scm cache: Catch invalid 'last-expiry-cleanup'. 2022-06-04 12:04:23 +02:00
challenge.scm guix: Move narinfo code from substitute script to module. 2021-01-16 11:51:03 +00:00
channels.scm
combinators.scm utils: Move combinators to (guix combinators). 2016-05-04 23:35:55 +02:00
containers.scm linux-container: 'container-excursion' forks to join the PID namespace. 2023-01-30 22:24:27 +01:00
cpan.scm tests: Ensure 'cpan' updater test does not access the network. 2023-06-09 14:19:14 +02:00
cpio.scm
cran.scm import: cran: Fix description->package test. 2021-12-18 04:09:47 +01:00
crate.scm
cve-sample.json
cve.scm
debug-link.scm tests: Add 'test-assertm' to (guix tests). 2018-11-12 23:37:13 +01:00
derivations.scm daemon: Improve error message for wrong hash sizes. 2023-01-09 17:40:54 +01:00
discovery.scm
egg.scm
elm.scm
elpa.scm
file-systems.scm
gem.scm
gexp.scm grafts: Run with a UTF-8 locale. 2022-11-11 23:17:42 +01:00
git-authenticate.scm git-authenticate: Ensure the target is a descendant of the introductory commit. 2022-02-14 11:23:08 +01:00
git.scm git: 'update-cached-checkout' returns the commit ID when given a tag. 2022-10-17 09:37:27 +02:00
glob.scm guix: Add globstar support. 2020-12-09 22:25:17 +01:00
gnu-maintenance.scm gnu-maintenance: Consider Qt source tarballs as "release files". 2023-08-26 11:38:56 -04:00
go.scm tests: go: Fix typo. 2021-09-28 22:00:47 +02:00
grafts.scm grafts: Run with a UTF-8 locale. 2022-11-11 23:17:42 +01:00
graph.scm tests: Adjust 'node-back-edges' test for 'bag' to system-dependent glibc. 2023-08-21 16:16:47 +02:00
gremlin.scm tests: Fix file-needed/recursive on aarch64-linux. 2022-01-16 20:21:27 -08:00
guix-archive.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-authenticate.sh tests: Move keys into ./tests/keys/ and add a third ed25519 key. 2021-12-22 10:53:19 +01:00
guix-build-branch.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-build.sh ui: 'load*' accepts /dev/fd/N files pointing to a pipe. 2023-08-17 17:33:53 +02:00
guix-daemon.sh
guix-describe.sh guix describe: Adjust test to latest changes. 2022-09-04 23:10:10 +02:00
guix-download.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-environment-container.sh
guix-environment.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-gc.sh
guix-git-authenticate.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-graph.sh tests: guix-graph.sh: Fix expected path from emacs to libffi. 2023-04-28 19:50:39 +02:00
guix-hash.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-home.sh tests: guix-home: Fix description search for home-mcron. 2023-08-25 17:45:47 +02:00
guix-lint.sh packages: 'package-field-location' handles 'search-path' returning #f. 2021-02-22 12:07:45 +01:00
guix-locate.sh Add 'guix locate'. 2023-06-18 23:44:29 +02:00
guix-pack-localstatedir.sh
guix-pack-relocatable.sh
guix-pack.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-package-aliases.sh tests: Relax two tests that expected a non-zero error code. 2023-04-21 17:09:46 +02:00
guix-package-net.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-package.sh
guix-refresh.sh refresh: Add --target-version option. 2023-08-15 09:38:29 -04:00
guix-repl.sh repl: Look for script files in (getcwd). 2020-09-16 16:04:01 +02:00
guix-shell-export-manifest.sh shell: Fix '--export-manifest' for cached profiles and when '-p' is used. 2022-06-16 23:57:40 +02:00
guix-shell.sh tests: guix-shell: Use bash instead of user's $SHELL. 2023-08-25 14:23:43 +02:00
guix-style.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-system.sh tests: Fix checks for expected failures. 2023-04-21 16:16:38 +02:00
guix-time-machine.sh scripts: time-machine: Error when attempting to visit too old commits. 2023-08-16 21:34:13 -04:00
hackage.scm import: hackage: Add upstream-name property. 2023-02-26 10:19:36 +01:00
hexpm.scm tests: Use quasiquoted 'match' patterns for package sexps. 2023-05-31 23:50:06 +02:00
home-import.scm
home-services.scm home: services: Add 'lookup-home-service-types' procedure. 2022-06-04 12:04:24 +02:00
http-client.scm tests: Add (guix http-client) tests. 2022-03-06 22:49:46 +01:00
import-git.scm
import-github.scm
import-utils.scm import-utils: Do not include punctuation when wrapping in @code{}. 2023-08-28 19:08:38 +02:00
inferior.scm
ipfs.scm
lint.scm lint: archival: Warn against non-origin package sources. 2023-05-06 17:12:45 +02:00
minetest.scm tests: Adjust minetest tests. 2023-06-09 14:19:14 +02:00
modules.scm Remove VM generation dead-code. 2021-12-23 10:54:00 +01:00
monads.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
nar.scm
networking.scm services: ntp-service-type: Remove deprecated server as strings support. 2023-04-07 17:56:07 +02:00
offload.scm offload: Modify the build-machine record to accept multiple systems. 2020-08-25 13:45:27 -04:00
opam.scm
openpgp.scm tests: Move keys into ./tests/keys/ and add a third ed25519 key. 2021-12-22 10:53:19 +01:00
pack.scm tests: pack: Fix indentation. 2023-07-18 16:56:06 -04:00
packages.scm tests: packages: Set system for expected result of package->bag. 2023-08-18 16:09:29 +02:00
pki.scm pki: 'public-keys->acl' deduplicates entries. 2022-12-12 15:03:05 +01:00
print.scm import: print: Quasiquote properties 2022-09-29 22:59:48 +02:00
processes.scm tests: processes: Skip tests if running with binfmt. 2019-12-10 10:49:42 +01:00
profiles.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
publish.scm publish: Send uncached narinfo replies from the main thread. 2022-04-29 18:07:17 +02:00
pypi.scm tests: Use quasiquoted 'match' patterns for package sexps. 2023-05-31 23:50:06 +02:00
read-print.scm read-print: Correctly read "(. x)". 2023-05-05 23:47:48 +02:00
records.scm tests: records: Add test for ellipsis in body. 2023-06-04 10:59:28 +02:00
rpm.scm pack: Add RPM format. 2023-02-19 21:13:23 -05:00
scripts.scm
search-paths.scm build: Remove 'gnu/packages/bootstrap' and its binaries. 2019-06-14 22:09:38 +02:00
services.scm gnu: services: Revert to deleting and updating all matching services 2023-08-31 23:31:50 -04:00
sets.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
size.scm
status.scm status: Relay "updating substitutes" messages. 2022-06-26 23:19:14 +02:00
store-database.scm database: Validate #:nar-size and #:time when registering store items. 2021-01-31 21:49:58 +01:00
store-deduplication.scm deduplicate: Use 'sendfile' for small file copies. 2022-12-10 10:56:48 +01:00
store-roots.scm tests: store-roots: Remove bogus test. 2023-08-18 16:10:08 +02:00
store.scm
style.scm style: Add 'arguments' styling rule. 2023-05-18 20:01:32 +02:00
substitute.scm substitute: Gracefully retry after failed partial downloads. 2023-06-08 22:54:58 +02:00
swh.scm
syscalls.scm
system.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
test.drv
texlive.scm tests: Fix texlive->guix-package test. 2023-08-13 02:00:00 +02:00
transformations.scm transformations: Add '--with-configure-flag'. 2023-05-04 17:06:44 +02:00
ui.scm
union.scm
upstream.scm tests: upstream: Restore test that was skipped. 2023-05-31 23:25:25 +02:00
utils.scm
uuid.scm uuid: 'fat-uuid->string' preserves leading zeros. 2019-05-07 12:18:44 +02:00
workers.scm