From f494a9a7a1a940d9dbaf35465f0976f6a89492c3 Mon Sep 17 00:00:00 2001 From: Michael McCracken Date: Wed, 24 Jul 2024 16:56:21 -0700 Subject: [PATCH] chore: add test for failing on missing bind source (#625) 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" +}