Skip to content

Commit

Permalink
add linter
Browse files Browse the repository at this point in the history
  • Loading branch information
theruziev committed May 25, 2024
1 parent fafc5a6 commit 6f49523
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ jobs:

- name: Test
run: go test -v -race ./...

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run GolangCI-Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.1
6 changes: 3 additions & 3 deletions internal/pkg/healthcheck/healthcheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func TestNewLivenessHandler(t *testing.T) {
req, err := http.NewRequest("GET", "/live", nil)
req, err := http.NewRequest("GET", "/live", http.NoBody)
require.NoError(t, err)

rr := httptest.NewRecorder()
Expand All @@ -23,7 +23,7 @@ func TestNewLivenessHandler(t *testing.T) {
func TestNewReadinessHandler(t *testing.T) {
t.Run("not serving", func(t *testing.T) {
healthcheck := NewHealthCheck()
req, err := http.NewRequest("GET", "/ready", nil)
req, err := http.NewRequest("GET", "/ready", http.NoBody)
require.NoError(t, err)

healthcheck.Shutdown()
Expand All @@ -36,7 +36,7 @@ func TestNewReadinessHandler(t *testing.T) {

t.Run("serving", func(t *testing.T) {
healthcheck := NewHealthCheck()
req, err := http.NewRequest("GET", "/ready", nil)
req, err := http.NewRequest("GET", "/ready", http.NoBody)
require.NoError(t, err)

healthcheck.Resume()
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/info/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func TestHandler(t *testing.T) {
req, err := http.NewRequest("GET", "/info", nil)
req, err := http.NewRequest("GET", "/info", http.NoBody)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 6f49523

Please sign in to comment.