diff --git a/internal/pkg/opentelemetry/controller_test.go b/internal/pkg/opentelemetry/controller_test.go index bee6f7147..327d80cd2 100644 --- a/internal/pkg/opentelemetry/controller_test.go +++ b/internal/pkg/opentelemetry/controller_test.go @@ -305,7 +305,7 @@ func TestTrace(t *testing.T) { ctrl.Trace(tt.traces) tp.ForceFlush(context.Background()) spans := exporter.GetSpans() - assert.Equal(t, len(tt.expected), len(spans)) + assert.Len(t, spans, len(tt.expected)) // span contexts get modified by exporter, update expected with output for i, span := range spans { diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 5585c9ff8..0cf25543c 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -22,7 +22,7 @@ require ( github.com/Abirdcfly/dupword v0.1.3 // indirect github.com/Antonboom/errname v1.1.0 // indirect github.com/Antonboom/nilnil v1.0.1 // indirect - github.com/Antonboom/testifylint v1.5.2 // indirect + github.com/Antonboom/testifylint v1.6.0 // indirect github.com/BurntSushi/toml v1.4.1-0.20241028111116-b7406c026f5a // indirect github.com/Crocmagnon/fatcontext v0.7.1 // indirect github.com/Djarvur/go-err113 v0.1.0 // indirect diff --git a/internal/tools/go.sum b/internal/tools/go.sum index ef8a39a75..ef5e212f2 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -13,8 +13,8 @@ github.com/Antonboom/errname v1.1.0 h1:A+ucvdpMwlo/myWrkHEUEBWc/xuXdud23S8tmTb/o github.com/Antonboom/errname v1.1.0/go.mod h1:O1NMrzgUcVBGIfi3xlVuvX8Q/VP/73sseCaAppfjqZw= github.com/Antonboom/nilnil v1.0.1 h1:C3Tkm0KUxgfO4Duk3PM+ztPncTFlOf0b2qadmS0s4xs= github.com/Antonboom/nilnil v1.0.1/go.mod h1:CH7pW2JsRNFgEh8B2UaPZTEPhCMuFowP/e8Udp9Nnb0= -github.com/Antonboom/testifylint v1.5.2 h1:4s3Xhuv5AvdIgbd8wOOEeo0uZG7PbDKQyKY5lGoQazk= -github.com/Antonboom/testifylint v1.5.2/go.mod h1:vxy8VJ0bc6NavlYqjZfmp6EfqXMtBgQ4+mhCojwC1P8= +github.com/Antonboom/testifylint v1.6.0 h1:6rdILVPt4+rqcvhid8w9wJNynKLUgqHNpFyM67UeXyc= +github.com/Antonboom/testifylint v1.6.0/go.mod h1:k+nEkathI2NFjKO6HvwmSrbzUcQ6FAnbZV+ZRrnXPLI= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= diff --git a/sdk/span_test.go b/sdk/span_test.go index d24f8f341..0ab4fe1e0 100644 --- a/sdk/span_test.go +++ b/sdk/span_test.go @@ -391,7 +391,7 @@ func TestSpanAddLinkLimit(t *testing.T) { func TestSpanLinkAttrLimit(t *testing.T) { nInt := len(tAttrs) - require.GreaterOrEqual(t, len(tAttrs), 0) + require.GreaterOrEqual(t, nInt, 0) n := uint32(nInt) // nolint: gosec // Bound checked. tests := []struct { @@ -523,7 +523,7 @@ func TestAddEventLimit(t *testing.T) { func TestAddEventAttrLimit(t *testing.T) { nInt := len(tAttrs) - require.GreaterOrEqual(t, len(tAttrs), 0) + require.GreaterOrEqual(t, nInt, 0) n := uint32(nInt) // nolint: gosec // Bound checked. tests := []struct { @@ -612,7 +612,7 @@ func TestSpanSetAttributes(t *testing.T) { func TestSpanAttributeLimits(t *testing.T) { nInt := len(tAttrs) - require.GreaterOrEqual(t, len(tAttrs), 0) + require.GreaterOrEqual(t, nInt, 0) n := uint32(nInt) // nolint: gosec // Bound checked. tests := []struct {