From 7763e0b7db6a16f2efececb6ffa9bd917a9eb5de Mon Sep 17 00:00:00 2001 From: Ross Smith Date: Mon, 30 Jan 2023 19:29:13 +0000 Subject: Install PowerShell Modules (#427) * InstallBicep * Add test for InstallBicep * Install pwsh Modules * Script rename * Add -Command to test * Check version * Install the module for all users * Adding terminating lines to scripts * Update src/powershell/install.sh Co-authored-by: Samruddhi Khandale * Update src/powershell/install.sh Co-authored-by: Samruddhi Khandale * Removed comments in Readme * Remove Bicep from PowerShell install * Increased version number * Update Minor version rather than patch --------- Co-authored-by: Samruddhi Khandale --- test/powershell/install_modules.sh | 13 +++++++++++++ test/powershell/scenarios.json | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 test/powershell/install_modules.sh create mode 100644 test/powershell/scenarios.json (limited to 'test/powershell') diff --git a/test/powershell/install_modules.sh b/test/powershell/install_modules.sh new file mode 100644 index 0000000..0bb0172 --- /dev/null +++ b/test/powershell/install_modules.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +# Import test library for `check` command +source dev-container-features-test-lib + +# Extension-specific tests +check "az.resources" pwsh -Command "(Get-Module -ListAvailable -Name Az.Resources).Version.ToString()" +check "az.storage" pwsh -Command "(Get-Module -ListAvailable -Name Az.Storage).Version.ToString()" + +# Report result +reportResults diff --git a/test/powershell/scenarios.json b/test/powershell/scenarios.json new file mode 100644 index 0000000..8ced964 --- /dev/null +++ b/test/powershell/scenarios.json @@ -0,0 +1,10 @@ +{ + "install_modules": { + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "features": { + "powershell": { + "modules": "az.resources, az.storage" + } + } + } +} -- cgit v1.2.3