From 2963ae91192b29a8ec049d7376dc69ff21b725f4 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Fri, 28 Oct 2022 12:32:58 -0500 Subject: Fix privs in Node, regressions from #199 (#241) Co-authored-by: Samruddhi Khandale --- test/node/install_additional_node.sh | 2 +- test/node/non_root_user.sh | 13 +++++++++++++ test/node/scenarios.json | 11 ++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100755 test/node/non_root_user.sh (limited to 'test/node') 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 -- cgit v1.2.3