-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"hello": { | ||
"image": "ubuntu:22.04", | ||
"features": { | ||
"ghcr.io/bounverif/devcontainers/features-ansible:0": { | ||
"version": "latest" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# This test file will be executed against an auto-generated devcontainer.json that | ||
# includes the 'hello' Feature with no options. | ||
# | ||
# For more information, see: https://github.com/devcontainers/cli/blob/main/docs/features/test.md | ||
# | ||
# Eg: | ||
# { | ||
# "image": "<..some-base-image...>", | ||
# "features": { | ||
# "hello": {} | ||
# }, | ||
# "remoteUser": "root" | ||
# } | ||
# | ||
# Thus, the value of all options will fall back to the default value in | ||
# the Feature's 'devcontainer-feature.json'. | ||
# For the 'hello' feature, that means the default favorite greeting is 'hey'. | ||
# | ||
# These scripts are run as 'root' by default. Although that can be changed | ||
# with the '--remote-user' flag. | ||
# | ||
# This test can be run with the following command: | ||
# | ||
# devcontainer features test \ | ||
# --features hello \ | ||
# --remote-user root \ | ||
# --skip-scenarios \ | ||
# --base-image ubuntu:latest \ | ||
# /path/to/this/repo | ||
|
||
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 "ansible --version" | ||
|
||
# Report results | ||
# If any of the checks above exited with a non-zero exit code, the test will fail. | ||
reportResults |