chore: Enable tparallel linter (#12175)
This commit is contained in:
parent
140c7334c6
commit
ccf3b1affe
|
|
@ -15,6 +15,7 @@ linters:
|
||||||
- revive
|
- revive
|
||||||
- sqlclosecheck
|
- sqlclosecheck
|
||||||
- staticcheck
|
- staticcheck
|
||||||
|
- tparallel
|
||||||
- typecheck
|
- typecheck
|
||||||
- unconvert
|
- unconvert
|
||||||
- unused
|
- unused
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/influxdata/telegraf"
|
"github.com/influxdata/telegraf"
|
||||||
"github.com/influxdata/telegraf/testutil"
|
"github.com/influxdata/telegraf/testutil"
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGather(t *testing.T) {
|
func TestGather(t *testing.T) {
|
||||||
|
|
@ -378,6 +379,8 @@ func TestParseXML(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSendRequest(t *testing.T) {
|
func TestSendRequest(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
statusCode int
|
statusCode int
|
||||||
|
|
@ -428,6 +431,8 @@ func TestSendRequest(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestParseTime(t *testing.T) {
|
func TestParseTime(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
input string
|
input string
|
||||||
|
|
@ -474,6 +479,8 @@ func TestParseTime(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFindProbe(t *testing.T) {
|
func TestFindProbe(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
fakeProbes := []probe{
|
fakeProbes := []probe{
|
||||||
{
|
{
|
||||||
Name: "test1",
|
Name: "test1",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue