Skip to content

Commit

Permalink
ci: unleash the paralleltest lints (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinvalle authored Jan 25, 2023
1 parent ef34f3a commit bbacfd4
Show file tree
Hide file tree
Showing 66 changed files with 70 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ linters:
- makezero
- misspell
- nilerr
# - paralleltest # Reference: https://github.com/kunwardeep/paralleltest/issues/14
- paralleltest
- predeclared
- staticcheck
- tenv
Expand Down
1 change: 1 addition & 0 deletions float64validator/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func TestAllValidatorValidateFloat64(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Float64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions float64validator/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func TestAnyValidatorValidateFloat64(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Float64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions float64validator/any_with_all_warnings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func TestAnyWithAllWarningsValidatorValidateFloat64(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Float64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions float64validator/at_least_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func TestAtLeastValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Float64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions float64validator/at_most_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func TestAtMostValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Float64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions float64validator/between_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func TestBetweenValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Float64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions float64validator/none_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestNoneOfValidator(t *testing.T) {
for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
req := validator.Float64Request{
ConfigValue: test.in,
}
Expand Down
1 change: 1 addition & 0 deletions float64validator/one_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestOneOfValidator(t *testing.T) {
for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
req := validator.Float64Request{
ConfigValue: test.in,
}
Expand Down
1 change: 1 addition & 0 deletions helpers/validatordiag/diag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestCapitalize(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
got := capitalize(test.input)

if got != test.expected {
Expand Down
1 change: 1 addition & 0 deletions int64validator/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func TestAllValidatorValidateInt64(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func TestAnyValidatorValidateInt64(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/any_with_all_warnings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func TestAnyWithAllWarningsValidatorValidateInt64(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/at_least_sum_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func TestAtLeastSumOfValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/at_least_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func TestAtLeastValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/at_most_sum_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func TestAtMostSumOfValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/at_most_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func TestAtMostValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/between_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func TestBetweenValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/equal_to_sum_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func TestEqualToSumOfValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.Int64Request{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions int64validator/none_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestNoneOfValidator(t *testing.T) {
for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
req := validator.Int64Request{
ConfigValue: test.in,
}
Expand Down
1 change: 1 addition & 0 deletions int64validator/one_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestOneOfValidator(t *testing.T) {
for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
req := validator.Int64Request{
ConfigValue: test.in,
}
Expand Down
2 changes: 2 additions & 0 deletions internal/schemavalidator/also_requires_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ func TestAlsoRequiresValidatorValidate(t *testing.T) {
}

for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
res := &schemavalidator.AlsoRequiresValidatorResponse{}

schemavalidator.AlsoRequiresValidator{
Expand Down
2 changes: 2 additions & 0 deletions internal/schemavalidator/at_least_one_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ func TestAtLeastOneOfValidatorValidate(t *testing.T) {
}

for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
res := &schemavalidator.AtLeastOneOfValidatorResponse{}

schemavalidator.AtLeastOneOfValidator{
Expand Down
2 changes: 2 additions & 0 deletions internal/schemavalidator/conflicts_with_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ func TestConflictsWithValidatorValidate(t *testing.T) {
}

for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
res := &schemavalidator.ConflictsWithValidatorResponse{}

schemavalidator.ConflictsWithValidator{
Expand Down
2 changes: 2 additions & 0 deletions internal/schemavalidator/exactly_one_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ func TestExactlyOneOfValidator(t *testing.T) {
}

for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
res := &schemavalidator.ExactlyOneOfValidatorResponse{}

schemavalidator.ExactlyOneOfValidator{
Expand Down
1 change: 1 addition & 0 deletions listvalidator/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestAllValidatorValidateList(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ListRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions listvalidator/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func TestAnyValidatorValidateList(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ListRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions listvalidator/any_with_all_warnings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func TestAnyWithAllWarningsValidatorValidateList(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ListRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions listvalidator/size_at_least_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func TestSizeAtLeastValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ListRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions listvalidator/size_at_most_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func TestSizeAtMostValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ListRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions listvalidator/size_between_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func TestSizeBetweenValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ListRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions mapvalidator/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestAllValidatorValidateMap(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.MapRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions mapvalidator/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func TestAnyValidatorValidateMap(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.MapRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions mapvalidator/any_with_all_warnings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func TestAnyWithAllWarningsValidatorValidateMap(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.MapRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions mapvalidator/keys_are_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func TestKeysAreValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.MapRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions mapvalidator/size_at_least_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func TestSizeAtLeastValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.MapRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions mapvalidator/size_at_most_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func TestSizeAtMostValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.MapRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions mapvalidator/size_between_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func TestSizeBetweenValidator(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.MapRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions numbervalidator/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func TestAllValidatorValidateNumber(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.NumberRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions numbervalidator/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func TestAnyValidatorValidateNumber(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.NumberRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions numbervalidator/any_with_all_warnings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestAnyWithAllWarningsValidatorValidateNumber(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.NumberRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions numbervalidator/none_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func TestNoneOfValidator(t *testing.T) {
for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
req := validator.NumberRequest{
ConfigValue: test.in,
}
Expand Down
1 change: 1 addition & 0 deletions numbervalidator/one_of_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func TestOneOfValidator(t *testing.T) {
for name, test := range testCases {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
req := validator.NumberRequest{
ConfigValue: test.in,
}
Expand Down
1 change: 1 addition & 0 deletions objectvalidator/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func TestAllValidatorValidateObject(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ObjectRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions objectvalidator/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func TestAnyValidatorValidateObject(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ObjectRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions objectvalidator/any_with_all_warnings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func TestAnyWithAllWarningsValidatorValidateObject(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.ObjectRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions setvalidator/all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestAllValidatorValidateSet(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.SetRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
1 change: 1 addition & 0 deletions setvalidator/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func TestAnyValidatorValidateSet(t *testing.T) {
for name, test := range tests {
name, test := name, test
t.Run(name, func(t *testing.T) {
t.Parallel()
request := validator.SetRequest{
Path: path.Root("test"),
PathExpression: path.MatchRoot("test"),
Expand Down
Loading

0 comments on commit bbacfd4

Please sign in to comment.