diff options
author | naturedamends <120284608+naturedamends@users.noreply.github.com> | 2023-08-26 02:39:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-26 02:39:32 +0300 |
commit | 0668db5edea56a0d57575db127b793f59b489e7b (patch) | |
tree | 75bb497eb03b763b358c3bdd270aa0041f3e39ca /test | |
parent | 0cf690ee14279d9e7ae5e1308950d6067d3aba81 (diff) |
Commonutils: chown: cannot access '/home/vscode/.zshrc': No such file or directory (#662)feature_common-utils_2.1.2
* Update main.sh
* Update devcontainer-feature.json
* Test install as non root user.
---------
Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/common-utils/configure_zsh_no_template_first_step.sh | 12 | ||||
-rw-r--r-- | test/common-utils/configure_zsh_no_template_second_step.sh (renamed from test/common-utils/configure_zsh_no_template.sh) | 5 | ||||
-rw-r--r-- | test/common-utils/scenarios.json | 16 |
3 files changed, 27 insertions, 6 deletions
diff --git a/test/common-utils/configure_zsh_no_template_first_step.sh b/test/common-utils/configure_zsh_no_template_first_step.sh new file mode 100644 index 0000000..d26874d --- /dev/null +++ b/test/common-utils/configure_zsh_no_template_first_step.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "default-zsh-with-no-zshrc" bash -c "[ ! -e ~/.zshrc ]" + +# Report result +reportResults diff --git a/test/common-utils/configure_zsh_no_template.sh b/test/common-utils/configure_zsh_no_template_second_step.sh index c62cae9..734fa66 100644 --- a/test/common-utils/configure_zsh_no_template.sh +++ b/test/common-utils/configure_zsh_no_template_second_step.sh @@ -4,12 +4,11 @@ set -e # Optional: Import test library source dev-container-features-test-lib - # Definition specific tests function file_not_overridden() { - cat ~/.zshrc | grep 'alias fnomockalias=' | grep testingmock + cat $1 | grep 'alias fnomockalias=' | grep testingmock } -check "default-zsh-with-no-zshrc" file_not_overridden +check "default-zsh-with-no-zshrc" file_not_overridden /home/devcontainer/.zshrc # Report result reportResults diff --git a/test/common-utils/scenarios.json b/test/common-utils/scenarios.json index 904a47b..d7b296d 100644 --- a/test/common-utils/scenarios.json +++ b/test/common-utils/scenarios.json @@ -115,10 +115,20 @@ } } }, - "configure_zsh_no_template": { + "configure_zsh_no_template_second_step": { "image": "mcr.microsoft.com/devcontainers/base:ubuntu", - "postCreateCommand": "echo alias fnomockalias=testingmock >> /root/.zshrc", - "remoteUser": "root", + "postCreateCommand": "echo alias fnomockalias=testingmock >> /home/devcontainer/.zshrc", + "remoteUser": "devcontainer", + "features": { + "common-utils": { + "installZsh": true, + "installOhMyZshConfig": false + } + } + }, + "configure_zsh_no_template_first_step": { + "image": "debian:bullseye", + "remoteUser": "devcontainer", "features": { "common-utils": { "installZsh": true, |