aboutsummaryrefslogtreecommitdiff
path: root/test/common-utils
diff options
context:
space:
mode:
authorKrikchai Pongtaveewould <krikchai.p@gmail.com>2023-08-03 01:12:14 +0300
committerGitHub <noreply@github.com>2023-08-03 01:12:14 +0300
commit685fa2e0f151b4545b444135a5ef6877de20e851 (patch)
tree2c8f9998a3dc39cc26414b980f721f67334f58a8 /test/common-utils
parent836ea1e9faea580509b59f7df1e3b29f19c00e17 (diff)
Fix: common-utils configureZshAsDefaultShell option not working on alpine linux image (#557)feature_common-utils_2.0.11
* alpine defaultZsh fix * common-utils: replace pam.d/chsh permission with `sufficient` * common-utils: revert match auth sufficient * common-utils: append auth string instead of replacing a whole file * fix grep 2nd param * fix: line checking condition
Diffstat (limited to 'test/common-utils')
-rw-r--r--test/common-utils/alpine-base-zsh-default.sh13
-rw-r--r--test/common-utils/scenarios.json13
2 files changed, 24 insertions, 2 deletions
diff --git a/test/common-utils/alpine-base-zsh-default.sh b/test/common-utils/alpine-base-zsh-default.sh
new file mode 100644
index 0000000..9fc00a2
--- /dev/null
+++ b/test/common-utils/alpine-base-zsh-default.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "alpine default shell zsh" \
+ bash -c "getent passwd $(whoami) | awk -F : '{ print $7 }' | grep '/bin/zsh'"
+
+# Report result
+reportResults
diff --git a/test/common-utils/scenarios.json b/test/common-utils/scenarios.json
index 21cb940..9800242 100644
--- a/test/common-utils/scenarios.json
+++ b/test/common-utils/scenarios.json
@@ -143,6 +143,7 @@
"build": {
"dockerfile": "Dockerfile"
},
+ "remoteUser": "vscode",
"features": {
"common-utils": {
"username": "vscode",
@@ -151,7 +152,15 @@
"upgradePackages": true,
"installZsh": true
}
- },
- "remoteUser": "vscode"
+ }
+ },
+ "alpine-base-zsh-default": {
+ "image": "mcr.microsoft.com/devcontainers/base:alpine",
+ "remoteUser": "vscode",
+ "features": {
+ "common-utils": {
+ "configureZshAsDefaultShell": true
+ }
+ }
}
}