engine: exec: add mount service tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
e7d8f17884
commit
85114025e6
@ -35,6 +35,7 @@ setup() {
|
|||||||
"$DAGGER" --europa up ./mount_fs.cue
|
"$DAGGER" --europa up ./mount_fs.cue
|
||||||
TESTSECRET="hello world" "$DAGGER" --europa up ./mount_secret.cue
|
TESTSECRET="hello world" "$DAGGER" --europa up ./mount_secret.cue
|
||||||
"$DAGGER" --europa up ./mount_tmp.cue
|
"$DAGGER" --europa up ./mount_tmp.cue
|
||||||
|
"$DAGGER" --europa up ./mount_service.cue
|
||||||
|
|
||||||
"$DAGGER" --europa up ./user.cue
|
"$DAGGER" --europa up ./user.cue
|
||||||
"$DAGGER" --europa up ./workdir.cue
|
"$DAGGER" --europa up ./workdir.cue
|
||||||
|
29
tests/tasks/exec/mount_service.cue
Normal file
29
tests/tasks/exec/mount_service.cue
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"alpha.dagger.io/europa/dagger/engine"
|
||||||
|
)
|
||||||
|
|
||||||
|
engine.#Plan & {
|
||||||
|
context: services: dockerSocket: unix: "/var/run/docker.sock"
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
image: engine.#Pull & {
|
||||||
|
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
|
||||||
|
}
|
||||||
|
|
||||||
|
imageWithDocker: engine.#Exec & {
|
||||||
|
input: image.output
|
||||||
|
args: ["apk", "add", "--no-cache", "docker-cli"]
|
||||||
|
}
|
||||||
|
|
||||||
|
verify: engine.#Exec & {
|
||||||
|
input: imageWithDocker.output
|
||||||
|
mounts: docker: {
|
||||||
|
dest: "/var/run/docker.sock"
|
||||||
|
contents: context.services.dockerSocket.service
|
||||||
|
}
|
||||||
|
args: ["docker", "info"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user