tests: add test for examples/simple

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-02-18 18:48:44 -08:00
parent 272f387737
commit 579908dbfa

View File

@ -13,6 +13,13 @@ DAGGER_BINARY_ARGS="${DAGGER_BINARY_ARGS:---log-format json}"
read -ra DAGGER_BINARY_ARGS <<< "${DAGGER_BINARY_ARGS:-}"
readonly DAGGER_BINARY_ARGS
test::examples() {
local dagger="$1"
test::one "Examples: simple" --stdout='{"www":{"listing":"simple.cue\n","source":{}}}' \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute --input-dir www.source="$d"/../examples/simple "$d"/../examples/simple
}
test::compute(){
local dagger="$1"
@ -237,6 +244,8 @@ test::all(){
test::export "$dagger"
test::input "$dagger"
test::subdir "$dagger"
test::examples "$dagger"
}
case "${1:-all}" in