Add test on docker.#Run

Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
This commit is contained in:
Vasek - Tom C
2022-01-21 17:02:12 +01:00
parent a6330f8167
commit 4ab852347b
5 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package test
import (
"dagger.io/dagger"
"dagger.io/dagger/engine"
"universe.dagger.io/docker"
"universe.dagger.io/alpine"
)
dagger.#Plan & {
actions: {
image: alpine.#Build
run: docker.#Run & {
"image": image.output
script: #"""
echo -n $TEST_MESSAGE >> /output.txt
"""#
env: TEST_MESSAGE: "hello world"
}
verify: engine.#ReadFile & {
input: run.output.rootfs
path: "/output.txt"
} & {
contents: "hello world"
}
}
}