features/test/common-utils/configure_zsh_as_default_shell.sh
naturedamends be082b0ef5
Common utils: Add config to remove zsh rc files from (#614)
* Add config to remove zsh rc files from common-utils.

* Bump version and add config to install script.

* Checks preventing excess writing to .zshrc.

* Change devcontainer feature option name.

* Coding standards.

* Favour adding feature via config 

and default to overriding .zshrc with dev-container default template.

* Update devcontainer-feature.json

* Update devcontainer-feature.json

* Update src/common-utils/devcontainer-feature.json

Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>

* Update src/common-utils/devcontainer-feature.json

Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>

* Testing for using devcontainer .zshrc template file.

* Coding standards.

* Coding standards.

* Update configure_zsh_as_default_shell_no_template.sh

* Grammar in configure_zsh_as_default_shell.sh

* Testing accounts for marked file cache  (#4)

* Account for mark file in testing.

* Remove some debugging and tests back

* Add back tests?

* Update configure_zsh_no_template.sh

---------

Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>
2023-08-11 16:01:57 -07:00

15 lines
438 B
Bash

#!/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'"
# check it overrides the ~/.zshrc with default dev containers template
check "default-zshrc-is-dev-container-template" bash -c "cat ~/.zshrc | grep ZSH_THEME | grep devcontainers"
# Report result
reportResults