aboutsummaryrefslogtreecommitdiff
path: root/test/node
diff options
context:
space:
mode:
authorChuck Lantz <clantz@microsoft.com>2022-10-28 20:32:58 +0300
committerGitHub <noreply@github.com>2022-10-28 20:32:58 +0300
commit2963ae91192b29a8ec049d7376dc69ff21b725f4 (patch)
tree320ae32fe67b460648a34900c2748de87860af25 /test/node
parentab021f0dfb0b4d28a2a71fd4b8502f5cb0b72004 (diff)
Fix privs in Node, regressions from #199 (#241)
Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>
Diffstat (limited to 'test/node')
-rw-r--r--test/node/install_additional_node.sh2
-rwxr-xr-xtest/node/non_root_user.sh13
-rw-r--r--test/node/scenarios.json11
3 files changed, 24 insertions, 2 deletions
diff --git a/test/node/install_additional_node.sh b/test/node/install_additional_node.sh
index 83dae86..1a1abca 100644
--- a/test/node/install_additional_node.sh
+++ b/test/node/install_additional_node.sh
@@ -5,7 +5,7 @@ set -e
# Optional: Import test library
source dev-container-features-test-lib
-# 'latest' is some version of node 18 for a while.
+# 'lts' is some version of node 18 for a while.
check "version_on_path" node -v | grep 18
check "v18_installed" ls -1 /usr/local/share/nvm/versions/node | grep 18
diff --git a/test/node/non_root_user.sh b/test/node/non_root_user.sh
new file mode 100755
index 0000000..6b6804d
--- /dev/null
+++ b/test/node/non_root_user.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "version" node --version
+check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm install 10"
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/node/scenarios.json b/test/node/scenarios.json
index 845c892..8f93d82 100644
--- a/test/node/scenarios.json
+++ b/test/node/scenarios.json
@@ -3,9 +3,18 @@
"image": "debian:11",
"features": {
"node": {
- "version": "latest",
+ "version": "lts",
"additionalVersions": "v17.9.1,v14.19.3"
}
}
+ },
+ "non_root_user": {
+ "image": "mcr.microsoft.com/devcontainers/base",
+ "remoteUser": "vscode",
+ "features": {
+ "node": {
+ "version": "latest"
+ }
+ }
}
} \ No newline at end of file