From 91b8a145251afa580f35feb5f800bd1e4492a2b0 Mon Sep 17 00:00:00 2001 From: Samruddhi Khandale Date: Tue, 8 Nov 2022 20:08:06 +0000 Subject: draft --- test/conda/install_conda.sh | 4 ++-- test/conda/test.sh | 2 +- test/docker-in-docker/azureDnsAutoDetectionEnabled.sh | 2 +- test/docker-in-docker/dockerDefaultAddressPool.sh | 2 +- test/dotnet/install_additional_dotnet.sh | 6 +++--- test/dotnet/install_dotnet_3.sh | 4 ++-- test/dotnet/install_dotnet_5.sh | 4 ++-- test/go/install_go_tool_in_postCreate.sh | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/conda/install_conda.sh b/test/conda/install_conda.sh index efe7f5e..66ca40d 100644 --- a/test/conda/install_conda.sh +++ b/test/conda/install_conda.sh @@ -5,8 +5,8 @@ set -e # Optional: Import test library source dev-container-features-test-lib -check "conda" conda --version | grep 4.12.0 -check "conda-forge" conda config --show channels | grep conda-forge +check "conda" bash -c "conda --version | grep 4.12.0" +check "conda-forge" bash -c "conda config --show channels | grep conda-forge" check "if conda-notice.txt exists" cat /usr/local/etc/vscode-dev-containers/conda-notice.txt # Report result diff --git a/test/conda/test.sh b/test/conda/test.sh index f300217..7c0df29 100755 --- a/test/conda/test.sh +++ b/test/conda/test.sh @@ -10,7 +10,7 @@ check "version" conda --version check "if conda-notice.txt exists" cat /usr/local/etc/vscode-dev-containers/conda-notice.txt # Check env -check "CONDA_SCRIPT is set correctly" echo $CONDA_SCRIPT | grep "/opt/conda/etc/profile.d/conda.sh" +check "CONDA_SCRIPT is set correctly" bash -c "echo $CONDA_SCRIPT | grep "/opt/conda/etc/profile.d/conda.sh"" # Report result reportResults diff --git a/test/docker-in-docker/azureDnsAutoDetectionEnabled.sh b/test/docker-in-docker/azureDnsAutoDetectionEnabled.sh index e63a1f3..02b07d9 100644 --- a/test/docker-in-docker/azureDnsAutoDetectionEnabled.sh +++ b/test/docker-in-docker/azureDnsAutoDetectionEnabled.sh @@ -6,7 +6,7 @@ set -e source dev-container-features-test-lib # Definition specific tests -check "dns flag should be present" ps -ax | grep -E "dockerd.+\-\-dns" +check "dns flag should be present" bash -c "ps -ax | grep -E "dockerd.+\-\-dns"" # Report result reportResults \ No newline at end of file diff --git a/test/docker-in-docker/dockerDefaultAddressPool.sh b/test/docker-in-docker/dockerDefaultAddressPool.sh index 8345357..8a48976 100644 --- a/test/docker-in-docker/dockerDefaultAddressPool.sh +++ b/test/docker-in-docker/dockerDefaultAddressPool.sh @@ -6,7 +6,7 @@ set -e source dev-container-features-test-lib # Definition specific tests -check "default address pool setting set" ps -ax | grep -E "dockerd.+base=192.168.0.0/16,size=24" +check "default address pool setting set" bash -c "ps -ax | grep -E "dockerd.+base=192.168.0.0/16,size=24"" # Report result reportResults \ No newline at end of file diff --git a/test/dotnet/install_additional_dotnet.sh b/test/dotnet/install_additional_dotnet.sh index fdb2da7..34103ea 100644 --- a/test/dotnet/install_additional_dotnet.sh +++ b/test/dotnet/install_additional_dotnet.sh @@ -5,9 +5,9 @@ set -e # Optional: Import test library source dev-container-features-test-lib -check "dotnet version 6.0.301 installed as default" dotnet --version | grep 6.0.301 -check "dotnet version 5.0 installed" ls -l /usr/local/dotnet | grep 5.0 -check "dotnet version 3.1.420 installed" ls -l /usr/local/dotnet | grep 3.1.420 +check "dotnet version 6.0.301 installed as default" bash -c "dotnet --version | grep 6.0.301" +check "dotnet version 5.0 installed" bash -c "ls -l /usr/local/dotnet | grep 5.0" +check "dotnet version 3.1.420 installed" bash -c "ls -l /usr/local/dotnet | grep 3.1.420" # Report result reportResults diff --git a/test/dotnet/install_dotnet_3.sh b/test/dotnet/install_dotnet_3.sh index 0d05215..5450a83 100644 --- a/test/dotnet/install_dotnet_3.sh +++ b/test/dotnet/install_dotnet_3.sh @@ -6,8 +6,8 @@ set -e source dev-container-features-test-lib check "dotnet sdks" dotnet --list-sdks -check "some major version of dotnet 3 is installed" dotnet --list-sdks | grep '3\.[0-9]*\.[0-9]*' -check "dotnet version 3 installed" ls -l /usr/share/dotnet/sdk | grep '3\.[0-9]*\.[0-9]*' +check "some major version of dotnet 3 is installed" bash -c "dotnet --list-sdks | grep '3\.[0-9]*\.[0-9]*'" +check "dotnet version 3 installed" bash -c "ls -l /usr/share/dotnet/sdk | grep '3\.[0-9]*\.[0-9]*'" # Report result reportResults diff --git a/test/dotnet/install_dotnet_5.sh b/test/dotnet/install_dotnet_5.sh index 5f48eb1..797feac 100644 --- a/test/dotnet/install_dotnet_5.sh +++ b/test/dotnet/install_dotnet_5.sh @@ -6,8 +6,8 @@ set -e source dev-container-features-test-lib check "dotnet sdks" dotnet --list-sdks -check "some major version of dotnet 5 is installed" dotnet --list-sdks | grep '5\.[0-9]*\.[0-9]*' -check "dotnet version 5 installed" ls -l /usr/share/dotnet/sdk | grep '5\.[0-9]*\.[0-9]*' +check "some major version of dotnet 5 is installed" bash -c "dotnet --list-sdks | grep '5\.[0-9]*\.[0-9]*'" +check "dotnet version 5 installed" bash -c "ls -l /usr/share/dotnet/sdk | grep '5\.[0-9]*\.[0-9]*'" # Report result diff --git a/test/go/install_go_tool_in_postCreate.sh b/test/go/install_go_tool_in_postCreate.sh index dbb086c..3f7c7c5 100644 --- a/test/go/install_go_tool_in_postCreate.sh +++ b/test/go/install_go_tool_in_postCreate.sh @@ -5,7 +5,7 @@ set -e # Optional: Import test library source dev-container-features-test-lib -check "mkcert version" mkcert --version | grep "v1.4.2" +check "mkcert version" bash -c "mkcert --version | grep 'v1.4.2'" check "mkcert is installed at correct path" which mkcert | grep "/go/bin/mkcert" check "golangci-lint version" golangci-lint --version | grep "golangci-lint has version 1.50.0" -- cgit v1.2.3