diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2024-06-02 09:15:54 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2024-08-04 11:54:50 +0300 |
commit | 26638b8e8129aa755586d017677b4cf076bafda6 (patch) | |
tree | 88709c2561081805e1dd00ee10a11ebd31996fe9 /gnu/tests | |
parent | 4e9c5c601905eb281f2304d0a0d35992c51054cd (diff) | |
download | guix-26638b8e8129aa755586d017677b4cf076bafda6.tar guix-26638b8e8129aa755586d017677b4cf076bafda6.tar.gz |
services: containerd: Provision separately from docker service.
containerd can operate independently without relying on Docker for its
configuration.
* gnu/services/docker.scm (docker-configuration): Deprecate containerd field.
(containerd-configuration, containerd-service-type): New variables.
(docker-shepherd-service): Use containerd-configuration. Delete duplicated
variable binding. Allow to configure environment variables.
(docker-service-type): Delete extension with containerd-service-type.
* gnu/tests/docker.scm (%docker-os, %oci-os): Add containerd service.
(run-docker-test, run-docker-system-test, run-oci-container-test): Run
containerd service.
* doc/guix.texi (Miscellaneous Services): Document containerd-service-type.
Change-Id: Ife0924e50a3e0aa2302d6592dae51ed894600004
Diffstat (limited to 'gnu/tests')
-rw-r--r-- | gnu/tests/docker.scm | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/gnu/tests/docker.scm b/gnu/tests/docker.scm index d550136b4a..46c886580c 100644 --- a/gnu/tests/docker.scm +++ b/gnu/tests/docker.scm @@ -54,6 +54,7 @@ (service dbus-root-service-type) (service polkit-service-type) (service elogind-service-type) + (service containerd-service-type) (service docker-service-type))) (define (run-docker-test docker-tarball) @@ -88,7 +89,21 @@ inside %DOCKER-OS." (test-runner-current (system-test-runner #$output)) (test-begin "docker") - (test-assert "service running" + (test-assert "containerd service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'containerd) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-assert "containerd PID file present" + (wait-for-file "/run/containerd/containerd.pid" marionette)) + + (test-assert "dockerd service running" (marionette-eval '(begin (use-modules (gnu services herd)) @@ -234,6 +249,20 @@ inside %DOCKER-OS." (test-runner-current (system-test-runner #$output)) (test-begin "docker") + (test-assert "containerd service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'containerd) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-assert "containerd PID file present" + (wait-for-file "/run/containerd/containerd.pid" marionette)) + (test-assert "service running" (marionette-eval '(begin @@ -327,6 +356,7 @@ docker-image} inside Docker.") (service dbus-root-service-type) (service polkit-service-type) (service elogind-service-type) + (service containerd-service-type) (service docker-service-type) (extra-special-file "/shared.txt" (plain-file "shared.txt" "hello")) @@ -384,6 +414,20 @@ docker-image} inside Docker.") (test-runner-current (system-test-runner #$output)) (test-begin "oci-container") + (test-assert "containerd service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'containerd) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-assert "containerd PID file present" + (wait-for-file "/run/containerd/containerd.pid" marionette)) + (test-assert "dockerd running" (marionette-eval '(begin |