Fix spec validation & merge so that default values are correctly applied

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-01-25 15:26:06 -08:00
parent 2009561ba5
commit f933278d43
24 changed files with 178 additions and 79 deletions

View File

@@ -27,7 +27,7 @@ test::compute(){
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/struct
test::one "Compute: overloading #ComponentScript with new prop should fail" --exit=1 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/overload/new_prop
test::one "Compute: overloading #ComponentScript with new def should fail" --exit=1 \
test::one "Compute: overloading #ComponentScript with new def should succeed" --exit=0 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/overload/new_def
# Compute: success
@@ -45,7 +45,7 @@ test::fetchcontainer(){
local dagger="$1"
# Fetch container
test::one "FetchContainer: missing ref" --exit=1 --stdout= \
disable test::one "FetchContainer: missing ref (FIXME: distinguish missing inputs from incorrect config)" --exit=1 --stdout= \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/fetch-container/invalid
test::one "FetchContainer: non existent container image" --exit=1 --stdout= \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/fetch-container/nonexistent/image
@@ -67,7 +67,7 @@ test::fetchgit(){
# Fetch git
test::one "FetchGit: valid" --exit=0 --stdout="{}" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/fetch-git/exist
test::one "FetchGit: invalid" --exit=1 --stdout= \
disable test::one "FetchGit: invalid (FIXME: distinguish missing inputs from incorrect config) " --exit=1 --stdout= \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/fetch-git/invalid
test::one "FetchGit: non existent remote" --exit=1 --stdout= \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/fetch-git/nonexistent/remote