aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests/docker.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2019-08-27 11:27:02 +0200
committerLudovic Courtès <ludo@gnu.org>2019-08-27 12:20:44 +0200
commit7979a287f8eb84cbbfa44629951572408939a756 (patch)
treeb72f53ded5b000c90323be5306978648021264b5 /gnu/tests/docker.scm
parent2b7c89f4fcc5e1607e153939d54d32aeaf494ca9 (diff)
downloadguix-7979a287f8eb84cbbfa44629951572408939a756.tar
guix-7979a287f8eb84cbbfa44629951572408939a756.tar.gz
pack: Create /tmp in Docker images.
Fixes <https://bugs.gnu.org/37161>. * guix/scripts/pack.scm (docker-image)[build]: Add a 'directory' entry for "/tmp" to DIRECTIVES. * tests/pack.scm ("docker-image + localstatedir"): Test the presence of /tmp. * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]: Test the presence and permission bits of "/tmp".
Diffstat (limited to 'gnu/tests/docker.scm')
-rw-r--r--gnu/tests/docker.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/gnu/tests/docker.scm b/gnu/tests/docker.scm
index 3ec5c3d6ee..3f98a1e316 100644
--- a/gnu/tests/docker.scm
+++ b/gnu/tests/docker.scm
@@ -100,7 +100,7 @@ inside %DOCKER-OS."
marionette))
(test-equal "Load docker image and run it"
- '("hello world" "hi!" "JSON!")
+ '("hello world" "hi!" "JSON!" #o1777)
(marionette-eval
`(begin
(define slurp
@@ -131,8 +131,15 @@ inside %DOCKER-OS."
,(string-append #$docker-cli "/bin/docker")
"run" repository&tag
"-c" "(use-modules (json))
- (display (json-string->scm (scm->json-string \"JSON!\")))")))
- (list response1 response2 response3)))
+ (display (json-string->scm (scm->json-string \"JSON!\")))"))
+
+ ;; Check whether /tmp exists.
+ (response4 (slurp
+ ,(string-append #$docker-cli "/bin/docker")
+ "run" repository&tag "-c"
+ "(display (stat:perms (lstat \"/tmp\")))")))
+ (list response1 response2 response3
+ (string->number response4))))
marionette))
(test-end)