mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
tests: Test lowering of file-like objects values for oci-image.
This patch is supposed to introduce a test case to ensure use cases like the one of https://codeberg.org/guix/guix/issues/3818 are working. * gnu/tests/containers.scm (%guile-oci-image): New variable. (%guile-bash-oci-image): New variable. (%oci-rootless-podman-os)[fist-container]: Use %guile-oci-image. [second-container]: Use file-like object as oci-image value. (%oci-docker-os): Ditto. Change-Id: I0052243dba2d901d497e1c0976a5aa1ebe9864a0 Reviewed-by: Owen T. Heisler <writer@owenh.net> Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
committed by
Sharlatan Hellseher
parent
bfa4e179e2
commit
cbbf6b1d57
@@ -351,7 +351,22 @@ standard output device and then enters a new line.")
|
||||
(description "Test rootless Podman service.")
|
||||
(value (build-tarball&run-rootless-podman-test))))
|
||||
|
||||
|
||||
(define %guile-oci-image
|
||||
(oci-image
|
||||
(repository "guile")
|
||||
(value
|
||||
(specifications->manifest '("guile")))
|
||||
(pack-options
|
||||
'(#:symlinks (("/bin" -> "bin"))))))
|
||||
|
||||
(define %guile-bash-oci-image
|
||||
(oci-image
|
||||
(repository "guile-bash")
|
||||
(value
|
||||
(specifications->manifest '("guile" "bash-minimal")))
|
||||
(pack-options
|
||||
'(#:symlinks (("/bin" -> "bin"))))))
|
||||
|
||||
(define %oci-network
|
||||
(oci-network-configuration (name "my-network")))
|
||||
|
||||
@@ -466,13 +481,7 @@ standard output device and then enters a new line.")
|
||||
(list
|
||||
(oci-container-configuration
|
||||
(provision "first")
|
||||
(image
|
||||
(oci-image
|
||||
(repository "guile")
|
||||
(value
|
||||
(specifications->manifest '("guile")))
|
||||
(pack-options
|
||||
'(#:symlinks (("/bin" -> "bin"))))))
|
||||
(image %guile-oci-image)
|
||||
(entrypoint "/bin/guile")
|
||||
(network "my-network")
|
||||
(command
|
||||
@@ -490,11 +499,11 @@ standard output device and then enters a new line.")
|
||||
(provision "second")
|
||||
(image
|
||||
(oci-image
|
||||
(repository "guile")
|
||||
(repository "guile-bash")
|
||||
(value
|
||||
(specifications->manifest '("guile")))
|
||||
(pack-options
|
||||
'(#:symlinks (("/bin" -> "bin"))))))
|
||||
(computed-file "guile-oci.tar.gz"
|
||||
#~(begin
|
||||
(symlink #$%guile-bash-oci-image #$output))))))
|
||||
(entrypoint "/bin/guile")
|
||||
(network "my-network")
|
||||
(command
|
||||
@@ -597,7 +606,7 @@ standard output device and then enters a new line.")
|
||||
#:verbose? #t))))
|
||||
marionette)))
|
||||
;; Allow services to come up on slower machines.
|
||||
(with-retries 80 1
|
||||
(with-retries 120 1
|
||||
(equal?
|
||||
'("localhost/guile:latest")
|
||||
(run-test)))))
|
||||
@@ -721,13 +730,7 @@ standard output device and then enters a new line.")
|
||||
(list
|
||||
(oci-container-configuration
|
||||
(provision "first")
|
||||
(image
|
||||
(oci-image
|
||||
(repository "guile")
|
||||
(value
|
||||
(specifications->manifest '("guile")))
|
||||
(pack-options
|
||||
'(#:symlinks (("/bin" -> "bin"))))))
|
||||
(image %guile-oci-image)
|
||||
(entrypoint "/bin/guile")
|
||||
(network "my-network")
|
||||
(command
|
||||
@@ -745,11 +748,11 @@ standard output device and then enters a new line.")
|
||||
(provision "second")
|
||||
(image
|
||||
(oci-image
|
||||
(repository "guile")
|
||||
(repository "guile-bash")
|
||||
(value
|
||||
(specifications->manifest '("guile")))
|
||||
(pack-options
|
||||
'(#:symlinks (("/bin" -> "bin"))))))
|
||||
(computed-file "guile-oci.tar.gz"
|
||||
#~(begin
|
||||
(symlink #$%guile-bash-oci-image #$output))))))
|
||||
(entrypoint "/bin/guile")
|
||||
(network "my-network")
|
||||
(command
|
||||
|
||||
Reference in New Issue
Block a user