From ef939f908c43bf89ade5d2153a751c7ee47989cc Mon Sep 17 00:00:00 2001 From: Samruddhi Khandale Date: Fri, 16 Sep 2022 13:51:35 -0700 Subject: Go - Adds `/go/bin` to PATH (#162) * bug fix * adds more checks * adds GOROOT * revert GOPATH changes --- test/go/install_go_tool_in_postCreate.sh | 12 ++++++++++++ test/go/scenarios.json | 11 +++++++++++ test/go/test.sh | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 test/go/install_go_tool_in_postCreate.sh create mode 100644 test/go/scenarios.json (limited to 'test/go') diff --git a/test/go/install_go_tool_in_postCreate.sh b/test/go/install_go_tool_in_postCreate.sh new file mode 100644 index 0000000..7d4bc7b --- /dev/null +++ b/test/go/install_go_tool_in_postCreate.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +check "mkcert version" mkcert --version | grep "v1.4.2" +check "mkcert is installed at correct path" which mkcert | grep "/go/bin/mkcert" + +# Report result +reportResults diff --git a/test/go/scenarios.json b/test/go/scenarios.json new file mode 100644 index 0000000..295dbe0 --- /dev/null +++ b/test/go/scenarios.json @@ -0,0 +1,11 @@ +{ + "install_go_tool_in_postCreate": { + "image": "ubuntu:focal", + "features": { + "go": { + "version": "latest" + } + }, + "postCreateCommand": "go install filippo.io/mkcert@v1.4.2" + } +} diff --git a/test/go/test.sh b/test/go/test.sh index 87cc950..ee9f171 100755 --- a/test/go/test.sh +++ b/test/go/test.sh @@ -6,6 +6,8 @@ set -e source dev-container-features-test-lib check "version" go version +check "revive version" revive --version +check "revive is installed at correct path" which revive | grep "/go/bin/revive" # Report result reportResults \ No newline at end of file -- cgit v1.2.3