generated from devcontainers/feature-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
9db83bc
commit 0d8b5a5
Showing
7 changed files
with
73 additions
and
41 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
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
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,28 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# This script is the "default" test script for the aws-cli-persistence feature. | ||
# It is not run as a scenario, but is run by other test scripts. | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
# check that `aws --help` works | ||
check "help" bash -c "aws help | grep 'usage'" | ||
|
||
# check that `.aws` and `/dc/aws-cli` exist under the user (should be node) | ||
check "~/.aws existence" bash -c "ls -la ~ | grep '.aws'" | ||
check "/dc/aws-cli existence" bash -c "ls -la /dc | grep 'aws-cli'" | ||
|
||
# check that the folders are owned by the user | ||
# `stat -c "%U %G" ~/.aws` returns "$USER $GROUP", in this case "node node" | ||
# https://askubuntu.com/a/175060 | ||
echo "Checking ownership of ~/.aws and /dc/aws-cli (ensure it is owned by $USER)" | ||
stat -c "%U" /dc/aws-cli | ||
|
||
check "~/.aws owned by user" bash -c "test \"$(stat -c "%U" ~/.aws)\" = \"$USER\"" | ||
check "/dc/aws-cli owned by user" bash -c "test \"$(stat -c "%U" /dc/aws-cli)\" = \"$USER\"" | ||
|
||
# Report result | ||
reportResults |
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,9 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source dev-container-features-test-lib | ||
|
||
# Run default test script (in same folder) | ||
# See: https://github.com/devcontainers/features/blob/562305d37b97d47331d96306ffc2a0a3cce55e64/test/azure-cli/install_extensions_bookworm.sh | ||
./default.sh |
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
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
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