diff --git a/test/action b/test/action index 38c0f60..19651e1 100755 --- a/test/action +++ b/test/action @@ -81,6 +81,27 @@ expected="hello from foo: a b c -y -z j --help" } +## -- direct charm access to \$COMPOSE_YML_FILE + + + cat <<'EOF2' > $test_tmpdir/www/actions/foo +#!/bin/bash + +printf "COMPOSE_YML_FILE: '%s'" "\$COMPOSE_YML_FILE" +EOF2 + +cd "$test_tmpdir" +out=\$("$tprog" foo web_site a b c -y -z j --help 2>&1 >/dev/null ) || exit 1 +expected="COMPOSE_YML_FILE: '$test_tmpdir/compose.yml'" + +[[ "\$out" == *"\$expected" ]] || { + echo "doesn't end with: \$expected" >&2 + echo "\$out" + exit 1 +} + + + EOF tear_test