From aae9de7ebc96170ddbaf8996d8ee2289176000aa Mon Sep 17 00:00:00 2001 From: Jacob Woffenden Date: Fri, 9 Dec 2022 22:08:20 +0000 Subject: Change default shell if installing ZSH (#325) * Added new option to configure zsh as default shell Added test scenario Bumped feature version * Update test/common-utils/scenarios.json Co-authored-by: Samruddhi Khandale * Update src/common-utils/devcontainer-feature.json Co-authored-by: Samruddhi Khandale * Update test/common-utils/configure_zsh_as_default_shell.sh Co-authored-by: Samruddhi Khandale Co-authored-by: Samruddhi Khandale --- test/common-utils/configure_zsh_as_default_shell.sh | 12 ++++++++++++ test/common-utils/scenarios.json | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100644 test/common-utils/configure_zsh_as_default_shell.sh create mode 100644 test/common-utils/scenarios.json (limited to 'test') diff --git a/test/common-utils/configure_zsh_as_default_shell.sh b/test/common-utils/configure_zsh_as_default_shell.sh new file mode 100644 index 0000000..e5cc89e --- /dev/null +++ b/test/common-utils/configure_zsh_as_default_shell.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "default-shell-is-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 new file mode 100644 index 0000000..aa36fcb --- /dev/null +++ b/test/common-utils/scenarios.json @@ -0,0 +1,10 @@ +{ + "configure_zsh_as_default_shell": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "common-utils": { + "configureZshAsDefaultShell": true + } + } + } +} -- cgit v1.2.3