Skip to content

Commit

Permalink
Address linter issues
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Balogh <javaducky@gmail.com>
  • Loading branch information
javaducky committed Jul 31, 2023
1 parent 05dffd0 commit c26b872
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
9 changes: 5 additions & 4 deletions pkg/statsd/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package statsd

import (
"encoding/json"
"testing"
"time"

"github.com/stretchr/testify/require"
"go.k6.io/k6/lib/types"
"go.k6.io/k6/metrics"
"gopkg.in/guregu/null.v3"
"testing"
"time"
)

func TestConfig(t *testing.T) {
Expand Down Expand Up @@ -53,14 +54,14 @@ func TestConfig(t *testing.T) {
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
config, err := getConsolidatedConfig(testCase.jsonRaw, testCase.env, testCase.arg)
checkConfig, err := getConsolidatedConfig(testCase.jsonRaw, testCase.env, testCase.arg)
if testCase.err != "" {
require.Error(t, err)
require.Contains(t, err.Error(), testCase.err)
return
}
require.NoError(t, err)
require.Equal(t, testCase.config, config)
require.Equal(t, testCase.config, checkConfig)
})
}
}
4 changes: 2 additions & 2 deletions pkg/statsd/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func baseTest(t *testing.T,
case <-end:
return
default:
n, _, err := listener.ReadFromUDP(buf[:])
require.NoError(t, err)
n, _, readErr := listener.ReadFromUDP(buf[:])
require.NoError(t, readErr)
ch <- string(buf[:n])
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/statsd/output.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package statsd enables real-time output of k6 test metrics to a statsd collector.
package statsd

import (
Expand Down
4 changes: 1 addition & 3 deletions register.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ import (
)

func init() {
output.RegisterExtension("output-statsd", func(p output.Params) (output.Output, error) {
return statsd.New(p)
})
output.RegisterExtension("output-statsd", statsd.New)
}

0 comments on commit c26b872

Please sign in to comment.