-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add golang linter Signed-off-by: michal.gubricky <[email protected]> * Remove unnecessary comment in dev-prerequests Signed-off-by: michal.gubricky <[email protected]> --------- Signed-off-by: michal.gubricky <[email protected]>
- Loading branch information
1 parent
040b92b
commit 2494eb1
Showing
4 changed files
with
122 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Check Go syntax | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'Tests/kaas/kaas-sonobuoy-tests/**/*.go' | ||
- .github/workflows/lint-go.yml | ||
|
||
jobs: | ||
lint-go-syntax: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.23' | ||
|
||
# Install golangci-lint | ||
- name: Install golangci-lint | ||
run: | | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 | ||
# Run golangci-lint | ||
- name: Run golangci-lint | ||
working-directory: Tests/kaas/kaas-sonobuoy-tests | ||
run: golangci-lint run ./... -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
Tests/kaas/kaas-sonobuoy-tests/scs_k8s_conformance_tests/scs_0200_smoke_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package scs_k8s_tests | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
"os" | ||
) | ||
|
||
|
||
func Test_scs_0200_smoke(t *testing.T) { | ||
// This test ensures that no DevelopmentMode was set | ||
// when using this test-suite productively | ||
developmentMode := os.Getenv(DevelopmentModeKey) | ||
// This test ensures that no DevelopmentMode was set | ||
// when using this test-suite productively | ||
developmentMode := os.Getenv(DevelopmentModeKey) | ||
if developmentMode != "" { | ||
t.Errorf("developmentMode is set to = %v; want None", developmentMode ) | ||
t.Errorf("developmentMode is set to = %v; want None", developmentMode) | ||
} | ||
} |