chore: Enable tparallel linter (#12175)

This commit is contained in:
Paweł Żak 2022-11-07 11:06:00 +01:00 committed by GitHub
parent 140c7334c6
commit ccf3b1affe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -15,6 +15,7 @@ linters:
- revive
- sqlclosecheck
- staticcheck
- tparallel
- typecheck
- unconvert
- unused

View File

@ -8,9 +8,10 @@ import (
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/require"
)
func TestGather(t *testing.T) {
@ -378,6 +379,8 @@ func TestParseXML(t *testing.T) {
}
func TestSendRequest(t *testing.T) {
t.Parallel()
tests := []struct {
name string
statusCode int
@ -428,6 +431,8 @@ func TestSendRequest(t *testing.T) {
}
func TestParseTime(t *testing.T) {
t.Parallel()
tests := []struct {
name string
input string
@ -474,6 +479,8 @@ func TestParseTime(t *testing.T) {
}
func TestFindProbe(t *testing.T) {
t.Parallel()
fakeProbes := []probe{
{
Name: "test1",