Skip to content

Commit

Permalink
test(go): Add scenario for no golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bartventer committed Jun 11, 2024
1 parent ead9ec2 commit dfe774c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/go/go_no_golangci_lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e

checkNotInstalled() {
local message="$1"
local command="$2"

if ! command -v "$command" >/dev/null 2>&1; then
echo "$message"
else
echo "$message"
exit 1
fi
}

# Optional: Import test library
# shellcheck disable=SC1091
source dev-container-features-test-lib

# go
check "version" go version

# golangci-lint
checkNotInstalled "golangci-lint is not installed" golangci-lint

# Report result
reportResults
8 changes: 8 additions & 0 deletions test/go/scenarios.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"go_no_golangci_lint": {
"image": "archlinux:latest",
"features": {
"go": {
"golangciLintVersion": "none"
}
}
},
"install_air": {
"image": "archlinux:latest",
"features": {
Expand Down

0 comments on commit dfe774c

Please sign in to comment.