Skip to content

Commit

Permalink
Lint tests (#2216)
Browse files Browse the repository at this point in the history
  • Loading branch information
halamix2 committed Sep 12, 2024
1 parent ca9fdb7 commit da769d3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
run:
modules-download-mode: readonly
timeout: 15m
tests: false
linters:
disable-all: true
enable:
Expand All @@ -23,3 +22,7 @@ issues:
- "unexported-return:"
- "context-as-argument:"
- "and that stutters"
- '`fixTestDeployment` - `namespace` always receives `"kyma-system"'
- "`fixCheckConfig` - `name` always receives `name`"
- "`fixCheckConfig` - `namespace` always receives `namespace`"
- "`fixTestHanaServiceBinding` - `namespace` always receives `namespace"
2 changes: 1 addition & 1 deletion internal/communitymodules/modules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func Test_installedModules(t *testing.T) {
func fixHttpResponseHandler(status int, response string) func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(status)
w.Write([]byte(response))
_, _ = w.Write([]byte(response))
}
}

Expand Down
2 changes: 0 additions & 2 deletions internal/kube/kyma/kyma_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ func TestUpdateDefaultKyma(t *testing.T) {

func Test_disableModule(t *testing.T) {
t.Parallel()
type args struct {
}
tests := []struct {
name string
kymaCR *Kyma
Expand Down
2 changes: 1 addition & 1 deletion internal/registry/portforward/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func fixDataStreamMock(t *testing.T, req *http.Request, resp *http.Response) htt
reqBytes := reqBuf.Bytes()

responseBuf := bytes.NewBuffer([]byte{})
resp.Write(responseBuf)
_ = resp.Write(responseBuf)

dataStreamMock := automock.NewStream(t)
dataStreamMock.On("Close").Return(nil).Twice()
Expand Down

0 comments on commit da769d3

Please sign in to comment.