From 01b46faa2dd7d9bd4f453b78f49457f2ffc67d3c Mon Sep 17 00:00:00 2001 From: Josh Spicer Date: Thu, 14 Jul 2022 14:12:11 -0400 Subject: smart auto-install multiple versions for `node` (#56) * node * fix comment (no-ci) * Apply suggestions from code review Co-authored-by: Samruddhi Khandale * update test scenario * remove minor for node 18 * update scenarios to object notation * add shabang * only set default node once Co-authored-by: Samruddhi Khandale --- test-scenarios/install_additional_node.sh | 17 +++++++++++++++++ test-scenarios/scenarios.json | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 test-scenarios/install_additional_node.sh (limited to 'test-scenarios') diff --git a/test-scenarios/install_additional_node.sh b/test-scenarios/install_additional_node.sh new file mode 100644 index 0000000..83dae86 --- /dev/null +++ b/test-scenarios/install_additional_node.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# 'latest' 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 +check "v14_installed" ls -1 /usr/local/share/nvm/versions/node | grep 14.19.3 +check "v17_installed" ls -1 /usr/local/share/nvm/versions/node | grep 17.9.1 + + +# Report result +reportResults diff --git a/test-scenarios/scenarios.json b/test-scenarios/scenarios.json index 5f594df..2c17057 100644 --- a/test-scenarios/scenarios.json +++ b/test-scenarios/scenarios.json @@ -12,6 +12,15 @@ } } }, + "install_additional_node": { + "image": "debian:11", + "features": { + "node": { + "version": "latest", + "additional_versions": "v17.9.1,v14.19.3" + } + } + }, "install_additional_python": { "image": "ubuntu:focal", "features": { -- cgit v1.2.3