devcontainers-features/test/hello/hello.sh
2023-09-15 20:25:04 +03:00

18 lines
560 B
Bash

#!/bin/bash
# This test file will be executed against one of the scenarios devcontainer.json test that
# includes the 'color' feature with "greeting": "hello" option.
set -e
# Optional: Import test library bundled with the devcontainer CLI
source dev-container-features-test-lib
# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib.
check "execute command" bash -c "hello | grep 'hello, $(whoami)!'"
# Report results
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults