tests: enable mount cache test, fix mount component test

Related to #46

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-03-01 18:16:56 -08:00
parent 50e8b8c07d
commit 39a7ebd176
2 changed files with 20 additions and 14 deletions

View File

@ -11,15 +11,21 @@ test: {
{ {
do: "exec" do: "exec"
args: ["sh", "-c", """ args: ["sh", "-c", """
ls -lA /lol > /out cat /mnt/test/lol > /out
"""] """]
dir: "/" mount: "/mnt/test": {
mount: something: { from: #dagger: compute: [
input: dagger: #compute: [{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
}] },
path: "/lol" {
do: "exec"
args: ["sh", "-c", """
echo -n "hello world" > /lol
"""]
}
]
} }
}, },
{ {

View File

@ -197,16 +197,16 @@ test::local(){
test::mount(){ test::mount(){
disable test::one "Mount: tmpfs (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \ disable test::one "Mount: tmpfs (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mount/valid/tmpfs "$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/tmpfs
disable test::one "Mount: cache (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \ test::one "Mount: cache (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mount/valid/cache "$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/cache
disable test::one "Mount: component (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \ test::one "Mount: component (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 --stdout='{"test":"hello world"}' \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mount/valid/component "$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/component
disable test::one "Mount: script (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \ disable test::one "Mount: script (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mount/valid/script "$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/script
} }
test::input() { test::input() {