From ffd2cd3ce2b0abb39477b4b0812ef8939ccf0f3a Mon Sep 17 00:00:00 2001 From: Michael McCracken Date: Tue, 11 Jun 2024 15:41:49 -0700 Subject: [PATCH] chore: add test for failing on missing bind source Just copied Ryan's test from the description of #624 with minimal editing. Signed-off-by: Michael McCracken --- test/binds.bats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/binds.bats b/test/binds.bats index 302ce423..99a0d5ca 100644 --- a/test/binds.bats +++ b/test/binds.bats @@ -73,3 +73,19 @@ EOF stat tree1/foo/bar } + +@test "fail on missing bind source" { + cat > stacker.yaml <<"EOF" +hello-binds: + from: + type: docker + url: ${{BUSYBOX_OCI}} + binds: + - thats_no_dir -> /mydir + run: | + mkdir -p /hello-stacker-app + echo 'echo "Hello Stacker!"' > /hello-stacker-app/hello.sh +EOF + + bad_stacker build -f stacker.yaml --substitute=BUSYBOX_OCI="$BUSYBOX_OCI" +}