Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions cmd/ttn-lw-cli/commands/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ var eventsCommand = &cobra.Command{
}()

for _, address := range getEventsAddresses() {
address := address // shadow loop variable.
g.Go(func() error {
conn, err := api.Dial(gCtx, address)
if err != nil {
Expand Down Expand Up @@ -137,7 +136,6 @@ var eventsFindRelatedCommand = &cobra.Command{
}()

for _, address := range getEventsAddresses() {
address := address // shadow loop variable.
g.Go(func() error {
conn, err := api.Dial(gCtx, address)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/applicationserver/grpc_deviceregistry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,6 @@ func TestDeviceRegistryBatchDelete(t *testing.T) { // nolint:paralleltest
BatchDeleteCalls: 1,
},
} {
tc := tc
test.RunSubtest(t, test.SubtestConfig{
Name: tc.Name,
Parallel: true,
Expand Down
2 changes: 0 additions & 2 deletions pkg/applicationserver/io/mqtt/topics/v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func TestV3AcceptedTopic(t *testing.T) {
OK: true,
},
} {
tc := tc
t.Run(strconv.Itoa(i), func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down Expand Up @@ -139,7 +138,6 @@ func TestV3Topics(t *testing.T) {
Expected: fmt.Sprintf("v3/%s/devices/%s/down/replace", appUID, devID),
},
} {
tc := tc
t.Run(tc.Expected, func(t *testing.T) {
t.Parallel()
actual := strings.Join(tc.Fn(appUID, devID), "/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ func TestNewTimeSyncCommand(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down Expand Up @@ -205,7 +204,6 @@ func TestMakeCommandValidInput(t *testing.T) {
var fPort uint32

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down Expand Up @@ -273,7 +271,6 @@ func TestMakeCommandInvalidInput(t *testing.T) {
var fPort uint32

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down Expand Up @@ -467,7 +464,6 @@ func TestMakeCommandsValidInput(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down Expand Up @@ -589,7 +585,6 @@ func TestMakeDownlinkSerializesAppTimeAns(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down
2 changes: 0 additions & 2 deletions pkg/applicationserver/io/packages/alcsync/v1/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func TestPackageDataHandlesInvalidValues(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down Expand Up @@ -222,7 +221,6 @@ func TestPackageDataMerge(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func TestTimeSynchronizationCommandCalculatesCorrection(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down Expand Up @@ -171,7 +170,6 @@ func TestTimeSynchronizationCommandRespectsThreshold(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down Expand Up @@ -231,7 +229,6 @@ func TestTimeSynchronizationCommandRespectsAnsRequired(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a, _ := test.New(t)
Expand Down
4 changes: 0 additions & 4 deletions pkg/applicationserver/io/packages/loragls/v3/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ func TestPackageDataDeserialization(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
data := &Data{}
Expand Down Expand Up @@ -219,7 +218,6 @@ func TestPackageDataSerialization(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -320,7 +318,6 @@ func TestPackageDataMerge(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -374,7 +371,6 @@ func TestPackageDataValidation(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion pkg/auth/rights/rights_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ func TestMap(t *testing.T) {
},
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a.So(tc.Assertion(t, tc.Rights, tc.NewMap(t, tc.Rights)), should.BeTrue)
Expand Down
4 changes: 0 additions & 4 deletions pkg/band/band_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,6 @@ func TestGenerateChMask(t *testing.T) {
},
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down Expand Up @@ -1542,7 +1541,6 @@ func TestCompareDatarates(t *testing.T) {
Expected: false,
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -1832,7 +1830,6 @@ func TestChannelsWellDefined(t *testing.T) {

for name, versions := range All {
for version, b := range versions {
b := b
t.Run(fmt.Sprintf("%v/%v", name, version), func(t *testing.T) {
t.Parallel()

Expand All @@ -1859,7 +1856,6 @@ func TestSubBandsWellDefined(t *testing.T) {

for name, versions := range All {
for version, b := range versions {
b := b
t.Run(fmt.Sprintf("%v/%v", name, version), func(t *testing.T) {
t.Parallel()

Expand Down
3 changes: 0 additions & 3 deletions pkg/band/reference_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ func TestBandDefinitions(t *testing.T) {
t.Parallel()
for name, versions := range band.All {
for version, b := range versions {
version, b := version, b
t.Run(fmt.Sprintf("%v/%v", name, version), func(t *testing.T) {
t.Parallel()
testBand(t, makeBand(b), version)
Expand All @@ -248,7 +247,6 @@ func TestLatest(t *testing.T) {
t.Parallel()

for name := range band.All {
name := name
t.Run(name, func(t *testing.T) {
t.Parallel()
if _, ok := band.LatestVersion[name]; !ok {
Expand All @@ -258,7 +256,6 @@ func TestLatest(t *testing.T) {
}

for name := range band.LatestVersion {
name := name
t.Run(name, func(t *testing.T) {
t.Parallel()
if _, ok := band.All[name]; !ok {
Expand Down
5 changes: 0 additions & 5 deletions pkg/band/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ func TestGetPhyVersions(t *testing.T) {
},
},
} {
tc := tc

t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -772,8 +770,6 @@ func TestBandConvertToBandDescription(t *testing.T) {
},
},
} {
tc := tc

t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -888,7 +884,6 @@ func TestListBands(t *testing.T) {
},
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions pkg/band/shared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ import (
func TestRelaySharedParameters(t *testing.T) {
t.Parallel()
for name, versions := range band.All {
name := name
for version, phy := range versions {
version, phy := version, phy
t.Run(fmt.Sprintf("%v/%v", name, version), func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down
1 change: 0 additions & 1 deletion pkg/basicstation/cups/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@ func TestServer(t *testing.T) { //nolint:gocyclo
},
},
} {
tt := tt
t.Run(tt.Name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down
3 changes: 0 additions & 3 deletions pkg/crypto/cryptoutil/cryptoutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func TestWrapAES128Key(t *testing.T) {
},
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down Expand Up @@ -107,7 +106,6 @@ func TestWrapAES128Key(t *testing.T) {
ExpectedError: errors.IsInvalidArgument,
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down Expand Up @@ -496,7 +494,6 @@ func TestUnwrapSelectedSessionKeys(t *testing.T) {
},
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down
1 change: 0 additions & 1 deletion pkg/crypto/cryptoutil/kek_labelers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ func TestComponentPrefixKEKLabeler(t *testing.T) {
Expected: "ns/12.34.56.78",
},
} {
tc := tc
t.Run(strconv.Itoa(i), func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down
1 change: 0 additions & 1 deletion pkg/crypto/hmachash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func TestHMACHash(t *testing.T) {
Payload: []byte("-----BEGIN EC PRIVATE KEY-----MHcCAQEEIBVXljefOUPY++0sovcF0dboOLEJz4eZ9DoUE8o9Y7GHoAoGCCqGSM49AwEHoUQDQgAEjf3zZPXlc/sseTt7YzF0o61feXvk98JFyy+s/j0gzMzUjEka7+WzTPERi9uMQjERns1qXG/9DJLe/Qxi0r84hA==-----END EC PRIVATE KEY-----"), //nolint:lll
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
key := types.AES128Key{
Expand Down
2 changes: 0 additions & 2 deletions pkg/deviceclaimingserver/grpc_end_devices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ func TestEndDeviceClaimingServer(t *testing.T) {
CallOpts: authorizedCallOpt,
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
_, err := edcsClient.Claim(ctx, tc.Req, tc.CallOpts)
Expand Down Expand Up @@ -790,7 +789,6 @@ func TestBatchOperations(t *testing.T) { // nolint:all
},
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
mockEndDeviceClaimer.BatchUnclaimFunc = tc.BatchUnclaimFunc
ret, err := edcsClient.Unclaim(ctx, tc.Req, tc.CallOpts)
Expand Down
2 changes: 0 additions & 2 deletions pkg/deviceclaimingserver/grpc_gateways_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ func TestGatewayClaimingServer(t *testing.T) { //nolint:paralleltest
CallOpt: authorizedCallOpt,
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
if tc.ClaimFunc != nil {
mockGatewayClaimer.ClaimFunc = tc.ClaimFunc
Expand Down Expand Up @@ -477,7 +476,6 @@ func TestGatewayClaimingServer(t *testing.T) { //nolint:paralleltest
CallOpt: authorizedCallOpt,
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
if tc.UnclaimFunc != nil {
mockGatewayClaimer.UnclaimFunc = tc.UnclaimFunc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func Test_VendorIDProfileFetcher_ShouldFetchProfile(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down Expand Up @@ -128,7 +127,6 @@ func Test_VendorIDProfileFetcher_FetchProfile(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func Test_VersionIDProfileFetcher_ShouldFetchProfile(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down Expand Up @@ -143,7 +142,6 @@ func Test_VersionIDProfileFetcher_FetchProfile(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down
1 change: 0 additions & 1 deletion pkg/devicetemplates/ttscsv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ func TestTTSCSVConverter(t *testing.T) {
nExpect: 1,
},
} {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion pkg/email/email_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func TestEmail(t *testing.T) {
returnedTemplate := registry.GetTemplate(ctx, ttnpb.GetNotificationTypeString(ttnpb.NotificationType_UNKNOWN))

for i, template := range []*email.Template{welcomeEmailTemplate, returnedTemplate} {
template := template
t.Run(fmt.Sprint(i), func(t *testing.T) {
t.Parallel()
a := assertions.New(t)
Expand Down
1 change: 0 additions & 1 deletion pkg/email/templates/templates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func TestEmailTemplates(t *testing.T) {
},
},
} {
tc := tc
t.Run(tc.TemplateName, func(t *testing.T) {
t.Parallel()
a, ctx := test.New(t)
Expand Down
1 change: 0 additions & 1 deletion pkg/encoding/lorawan/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func TestMarshalRelayForwardUplinkReq(t *testing.T) {
},
},
} {
tc := tc
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

Expand Down
Loading
Loading