Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore]: enable expected-actual rule from testifylint #6154

Merged
merged 2 commits into from
Sep 25, 2024
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
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ linters-settings:
testifylint:
enable-all: true
disable:
- expected-actual
- float-compare
- formatter
- require-error
2 changes: 1 addition & 1 deletion bridges/otellogr/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func TestConvertValue(t *testing.T) {
},
} {
t.Run(tt.name, func(t *testing.T) {
assert.Equal(t, convertValue(tt.value), tt.wantValue)
assert.Equal(t, tt.wantValue, convertValue(tt.value))
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion config/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ func TestInstrumentType(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
got, err := instrumentKind(tt.instType)
if tt.wantErr != nil {
require.Equal(t, err, tt.wantErr)
require.Equal(t, tt.wantErr, err)
require.Zero(t, got)
} else {
require.NoError(t, err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func Test_Span_name(t *testing.T) {
operation1 := ""
operation2 := "Operation"

assert.Equal(t, spanName(serviceID1, operation1), "")
assert.Equal(t, "", spanName(serviceID1, operation1))
assert.Equal(t, spanName(serviceID1, operation2), "."+operation2)
assert.Equal(t, spanName(serviceID2, operation1), serviceID2)
assert.Equal(t, spanName(serviceID2, operation2), serviceID2+"."+operation2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestSpanStatus(t *testing.T) {
container.ServeHTTP(httptest.NewRecorder(), httptest.NewRequest("GET", "/", nil))

require.Len(t, sr.Ended(), 1, "should emit a span")
assert.Equal(t, sr.Ended()[0].Status().Code, tc.wantSpanStatus, "should only set Error status for HTTP statuses >= 500")
assert.Equal(t, tc.wantSpanStatus, sr.Ended()[0].Status().Code, "should only set Error status for HTTP statuses >= 500")
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func TestSpanStatus(t *testing.T) {
router.ServeHTTP(httptest.NewRecorder(), httptest.NewRequest("GET", "/", nil))

require.Len(t, sr.Ended(), 1, "should emit a span")
assert.Equal(t, sr.Ended()[0].Status().Code, tc.wantSpanStatus, "should only set Error status for HTTP statuses >= 500")
assert.Equal(t, tc.wantSpanStatus, sr.Ended()[0].Status().Code, "should only set Error status for HTTP statuses >= 500")
})
}
}
Expand All @@ -174,7 +174,7 @@ func TestSpanName(t *testing.T) {
router.ServeHTTP(httptest.NewRecorder(), httptest.NewRequest("GET", tc.requestPath, nil))

require.Len(t, sr.Ended(), 1, "should emit a span")
assert.Equal(t, sr.Ended()[0].Name(), tc.wantSpanName, "span name not correct")
assert.Equal(t, tc.wantSpanName, sr.Ended()[0].Name(), "span name not correct")
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestNotFoundIsNotError(t *testing.T) {
attribute.String("http.method", "GET"),
attribute.String("http.route", "/does/not/exist"),
)
assert.Equal(t, sr.Ended()[0].Status().Code, codes.Unset)
assert.Equal(t, codes.Unset, sr.Ended()[0].Status().Code)
}

func assertSpan(t *testing.T, span sdktrace.ReadOnlySpan, name string, kind trace.SpanKind, attrs ...attribute.KeyValue) {
Expand All @@ -148,7 +148,7 @@ func assertSpan(t *testing.T, span sdktrace.ReadOnlySpan, name string, kind trac
if !assert.Contains(t, got, want.Key) {
continue
}
assert.Equal(t, got[want.Key], want.Value)
assert.Equal(t, want.Value, got[want.Key])
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ func TestMetadataSupplier(t *testing.T) {
ms := &metadataSupplier{&md}

v1 := ms.Get("k1")
assert.Equal(t, v1, "v1")
assert.Equal(t, "v1", v1)

ms.Set("k2", "v2")

v1 = ms.Get("k1")
v2 := ms.Get("k2")
assert.Equal(t, v1, "v1")
assert.Equal(t, v2, "v2")
assert.Equal(t, "v1", v1)
assert.Equal(t, "v2", v2)
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestSpanStatus(t *testing.T) {
m.ServeHTTP(httptest.NewRecorder(), httptest.NewRequest("GET", "/", nil))

require.Len(t, sr.Ended(), 1, "should emit a span")
assert.Equal(t, sr.Ended()[0].Status().Code, tc.wantSpanStatus, "should only set Error status for HTTP statuses >= 500")
assert.Equal(t, tc.wantSpanStatus, sr.Ended()[0].Status().Code, "should only set Error status for HTTP statuses >= 500")
})
}
}
2 changes: 1 addition & 1 deletion instrumentation/net/http/otelhttp/test/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ func TestSpanStatus(t *testing.T) {
h.ServeHTTP(httptest.NewRecorder(), httptest.NewRequest("GET", "/", nil))

require.Len(t, sr.Ended(), 1, "should emit a span")
assert.Equal(t, sr.Ended()[0].Status().Code, tc.wantSpanStatus, "should only set Error status for HTTP statuses >= 500")
assert.Equal(t, tc.wantSpanStatus, sr.Ended()[0].Status().Code, "should only set Error status for HTTP statuses >= 500")
})
}
}
Expand Down
6 changes: 3 additions & 3 deletions propagators/aws/xray/idgenerator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestTraceIDIsValidLength(t *testing.T) {
traceID, _ := idg.NewIDs(context.Background())

expectedTraceIDLength := 32
assert.Equal(t, len(traceID.String()), expectedTraceIDLength, "TraceID has incorrect length.")
assert.Len(t, traceID.String(), expectedTraceIDLength, "TraceID has incorrect length.")
}

func TestTraceIDIsUnique(t *testing.T) {
Expand Down Expand Up @@ -63,8 +63,8 @@ func TestSpanIDIsValidLength(t *testing.T) {
spanID2 := idg.NewSpanID(context.Background(), traceID)
expectedSpanIDLength := 16

assert.Equal(t, len(spanID1.String()), expectedSpanIDLength, "SpanID has incorrect length")
assert.Equal(t, len(spanID2.String()), expectedSpanIDLength, "SpanID has incorrect length")
assert.Len(t, spanID1.String(), expectedSpanIDLength, "SpanID has incorrect length")
assert.Len(t, spanID2.String(), expectedSpanIDLength, "SpanID has incorrect length")
}

func TestSpanIDIsUnique(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions samplers/aws/xray/fallback_sampler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func TestSampleUsingFallbackSampler(t *testing.T) {
fs := NewFallbackSampler()
assert.NotEmpty(t, fs.defaultSampler)
assert.Equal(t, fs.quotaBalance, 1.0)
assert.Equal(t, 1.0, fs.quotaBalance)

sd := fs.ShouldSample(trace.SamplingParameters{})
assert.Equal(t, trace.RecordAndSample, sd.Decision)
Expand Down Expand Up @@ -52,12 +52,12 @@ func TestBorrowWithLargeElapsedTime(t *testing.T) {
// Increase the time by 9 seconds
borrowed = fs.take(time.Unix(1500000009, 0), 1.0)
assert.True(t, borrowed)
assert.Equal(t, fs.quotaBalance, 0.0)
assert.Equal(t, 0.0, fs.quotaBalance)
}

// assert fallback sampling description.
func TestFallbackSamplerDescription(t *testing.T) {
fs := NewFallbackSampler()
s := fs.Description()
assert.Equal(t, s, "FallbackSampler{fallback sampling with sampling config of 1 req/sec and 5% of additional requests}")
assert.Equal(t, "FallbackSampler{fallback sampling with sampling config of 1 req/sec and 5% of additional requests}", s)
}
64 changes: 32 additions & 32 deletions samplers/aws/xray/internal/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,26 @@ func TestGetSamplingRules(t *testing.T) {
samplingRules, err := client.getSamplingRules(ctx)
require.NoError(t, err)

assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.RuleName, "Default")
assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.ServiceType, "*")
assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.Host, "*")
assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.URLPath, "*")
assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.ReservoirSize, 60.0)
assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.FixedRate, 0.5)

assert.Equal(t, samplingRules.SamplingRuleRecords[1].SamplingRule.RuleName, "test-rule")
assert.Equal(t, samplingRules.SamplingRuleRecords[1].SamplingRule.ServiceType, "local")
assert.Equal(t, samplingRules.SamplingRuleRecords[1].SamplingRule.Host, "*")
assert.Equal(t, samplingRules.SamplingRuleRecords[1].SamplingRule.URLPath, "/aws-sdk-call")
assert.Equal(t, samplingRules.SamplingRuleRecords[1].SamplingRule.ReservoirSize, 3.0)
assert.Equal(t, samplingRules.SamplingRuleRecords[1].SamplingRule.FixedRate, 0.09)

assert.Equal(t, samplingRules.SamplingRuleRecords[2].SamplingRule.RuleName, "test-rule-1")
assert.Equal(t, samplingRules.SamplingRuleRecords[2].SamplingRule.ServiceType, "*")
assert.Equal(t, samplingRules.SamplingRuleRecords[2].SamplingRule.Host, "*")
assert.Equal(t, samplingRules.SamplingRuleRecords[2].SamplingRule.URLPath, "*")
assert.Equal(t, samplingRules.SamplingRuleRecords[2].SamplingRule.ReservoirSize, 100.0)
assert.Equal(t, samplingRules.SamplingRuleRecords[2].SamplingRule.FixedRate, 0.09)
assert.Equal(t, "Default", samplingRules.SamplingRuleRecords[0].SamplingRule.RuleName)
assert.Equal(t, "*", samplingRules.SamplingRuleRecords[0].SamplingRule.ServiceType)
assert.Equal(t, "*", samplingRules.SamplingRuleRecords[0].SamplingRule.Host)
assert.Equal(t, "*", samplingRules.SamplingRuleRecords[0].SamplingRule.URLPath)
assert.Equal(t, 60.0, samplingRules.SamplingRuleRecords[0].SamplingRule.ReservoirSize)
assert.Equal(t, 0.5, samplingRules.SamplingRuleRecords[0].SamplingRule.FixedRate)

assert.Equal(t, "test-rule", samplingRules.SamplingRuleRecords[1].SamplingRule.RuleName)
assert.Equal(t, "local", samplingRules.SamplingRuleRecords[1].SamplingRule.ServiceType)
assert.Equal(t, "*", samplingRules.SamplingRuleRecords[1].SamplingRule.Host)
assert.Equal(t, "/aws-sdk-call", samplingRules.SamplingRuleRecords[1].SamplingRule.URLPath)
assert.Equal(t, 3.0, samplingRules.SamplingRuleRecords[1].SamplingRule.ReservoirSize)
assert.Equal(t, 0.09, samplingRules.SamplingRuleRecords[1].SamplingRule.FixedRate)

assert.Equal(t, "test-rule-1", samplingRules.SamplingRuleRecords[2].SamplingRule.RuleName)
assert.Equal(t, "*", samplingRules.SamplingRuleRecords[2].SamplingRule.ServiceType)
assert.Equal(t, "*", samplingRules.SamplingRuleRecords[2].SamplingRule.Host)
assert.Equal(t, "*", samplingRules.SamplingRuleRecords[2].SamplingRule.URLPath)
assert.Equal(t, 100.0, samplingRules.SamplingRuleRecords[2].SamplingRule.ReservoirSize)
assert.Equal(t, 0.09, samplingRules.SamplingRuleRecords[2].SamplingRule.FixedRate)
}

func TestGetSamplingRulesWithMissingValues(t *testing.T) {
Expand Down Expand Up @@ -153,11 +153,11 @@ func TestGetSamplingRulesWithMissingValues(t *testing.T) {
require.NoError(t, err)

// Priority and ReservoirSize are missing in API response so they are assigned as nil
assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.Priority, int64(0))
assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.ReservoirSize, 0.0)
assert.Equal(t, int64(0), samplingRules.SamplingRuleRecords[0].SamplingRule.Priority)
assert.Equal(t, 0.0, samplingRules.SamplingRuleRecords[0].SamplingRule.ReservoirSize)

// other values are stored as expected
assert.Equal(t, samplingRules.SamplingRuleRecords[0].SamplingRule.RuleName, "Default")
assert.Equal(t, "Default", samplingRules.SamplingRuleRecords[0].SamplingRule.RuleName)
}

func TestGetSamplingTargets(t *testing.T) {
Expand Down Expand Up @@ -188,15 +188,15 @@ func TestGetSamplingTargets(t *testing.T) {
samplingTragets, err := client.getSamplingTargets(ctx, nil)
require.NoError(t, err)

assert.Equal(t, *samplingTragets.LastRuleModification, float64(123456))
assert.Equal(t, *samplingTragets.SamplingTargetDocuments[0].FixedRate, float64(5))
assert.Equal(t, *samplingTragets.SamplingTargetDocuments[0].Interval, int64(5))
assert.Equal(t, *samplingTragets.SamplingTargetDocuments[0].ReservoirQuota, 3.0)
assert.Equal(t, *samplingTragets.SamplingTargetDocuments[0].ReservoirQuotaTTL, float64(456789))
assert.Equal(t, *samplingTragets.SamplingTargetDocuments[0].RuleName, "r1")
assert.Equal(t, *samplingTragets.UnprocessedStatistics[0].RuleName, "r1")
assert.Equal(t, *samplingTragets.UnprocessedStatistics[0].ErrorCode, "200")
assert.Equal(t, *samplingTragets.UnprocessedStatistics[0].Message, "ok")
assert.Equal(t, float64(123456), *samplingTragets.LastRuleModification)
assert.Equal(t, float64(5), *samplingTragets.SamplingTargetDocuments[0].FixedRate)
assert.Equal(t, int64(5), *samplingTragets.SamplingTargetDocuments[0].Interval)
assert.Equal(t, 3.0, *samplingTragets.SamplingTargetDocuments[0].ReservoirQuota)
assert.Equal(t, float64(456789), *samplingTragets.SamplingTargetDocuments[0].ReservoirQuotaTTL)
assert.Equal(t, "r1", *samplingTragets.SamplingTargetDocuments[0].RuleName)
assert.Equal(t, "r1", *samplingTragets.UnprocessedStatistics[0].RuleName)
assert.Equal(t, "200", *samplingTragets.UnprocessedStatistics[0].ErrorCode)
assert.Equal(t, "ok", *samplingTragets.UnprocessedStatistics[0].Message)
}

func TestGetSamplingTargetsMissingValues(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions samplers/aws/xray/internal/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,8 @@ func TestRefreshManifestTargets(t *testing.T) {

// assert target updates
require.Len(t, m.Rules, 1)
assert.Equal(t, m.Rules[0].ruleProperties.FixedRate, 0.06)
assert.Equal(t, m.Rules[0].reservoir.quota, 23.0)
assert.Equal(t, 0.06, m.Rules[0].ruleProperties.FixedRate)
assert.Equal(t, 23.0, m.Rules[0].reservoir.quota)
assert.Equal(t, m.Rules[0].reservoir.expiresAt, time.Unix(15000000, 0))
assert.Equal(t, m.Rules[0].reservoir.interval, time.Duration(25))
}
Expand Down Expand Up @@ -1773,13 +1773,13 @@ func TestDoNotPreserveRulesWithDifferentRuleProperties(t *testing.T) {
SamplingRuleRecords: []*samplingRuleRecords{&ruleRecords},
})

require.Equal(t, m.Rules[0].reservoir.quota, 0.0)
require.Equal(t, m.Rules[0].reservoir.quotaBalance, 0.0)
require.Equal(t, *m.Rules[0].samplingStatistics, samplingStatistics{
require.Equal(t, 0.0, m.Rules[0].reservoir.quota)
require.Equal(t, 0.0, m.Rules[0].reservoir.quotaBalance)
require.Equal(t, samplingStatistics{
matchedRequests: 0,
sampledRequests: 0,
borrowedRequests: 0,
})
}, *m.Rules[0].samplingStatistics)
}

// validate no data race is when capturing sampling statistics in manifest while sampling.
Expand Down
24 changes: 12 additions & 12 deletions samplers/aws/xray/internal/reservoir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,35 +121,35 @@ func TestConsumeFromReservoir(t *testing.T) {

// reservoir updates the quotaBalance for new second and allows to consume
// quota balance is 0 because we are consuming from reservoir for the first time
assert.Equal(t, r.quotaBalance, 0.0)
assert.Equal(t, 0.0, r.quotaBalance)
assert.True(t, r.take(clock.now(), false, 1.0))
assert.Equal(t, r.quotaBalance, 1.0)
assert.Equal(t, 1.0, r.quotaBalance)
assert.True(t, r.take(clock.now(), false, 1.0))
assert.Equal(t, r.quotaBalance, 0.0)
assert.Equal(t, 0.0, r.quotaBalance)
// once assigned quota is consumed reservoir does not allow to consume in that second
assert.False(t, r.take(clock.now(), false, 1.0))

// increase the clock by 1
clock.nowTime = 1500000001

// reservoir updates the quotaBalance for new second and allows to consume
assert.Equal(t, r.quotaBalance, 0.0)
assert.Equal(t, 0.0, r.quotaBalance)
assert.True(t, r.take(clock.now(), false, 1.0))
assert.Equal(t, r.quotaBalance, 1.0)
assert.Equal(t, 1.0, r.quotaBalance)
assert.True(t, r.take(clock.now(), false, 1.0))
assert.Equal(t, r.quotaBalance, 0.0)
assert.Equal(t, 0.0, r.quotaBalance)
// once assigned quota is consumed reservoir does not allow to consume in that second
assert.False(t, r.take(clock.now(), false, 1.0))

// increase the clock by 4
clock.nowTime = 1500000005

// reservoir updates the quotaBalance with one second worth of quota (even though 4 seconds have passed) and allows to consume
assert.Equal(t, r.quotaBalance, 0.0)
assert.Equal(t, 0.0, r.quotaBalance)
assert.True(t, r.take(clock.now(), false, 1.0))
assert.Equal(t, r.quotaBalance, 1.0)
assert.Equal(t, 1.0, r.quotaBalance)
assert.True(t, r.take(clock.now(), false, 1.0))
assert.Equal(t, r.quotaBalance, 0.0)
assert.Equal(t, 0.0, r.quotaBalance)
}

func TestZeroCapacityFailBorrow(t *testing.T) {
Expand All @@ -163,15 +163,15 @@ func TestZeroCapacityFailBorrow(t *testing.T) {
}

// start with no quota balance
assert.Equal(t, r.quotaBalance, 0.0)
assert.Equal(t, 0.0, r.quotaBalance)
// attempt to borrow from reservoir, and should fail since there is no capacity
assert.False(t, r.take(clock.now(), true, 1.0))

// increase the clock by 5
clock.nowTime = 1500000005

// validate there is still no quota balance
assert.Equal(t, r.quotaBalance, 0.0)
assert.Equal(t, 0.0, r.quotaBalance)
// again, attempt to borrow from reservoir, and should fail since there is no capacity
assert.False(t, r.take(clock.now(), true, 1.0))
}
Expand Down Expand Up @@ -219,7 +219,7 @@ func TestQuotaBalanceAfterPortionOfSecond(t *testing.T) {
r.refreshQuotaBalanceLocked(clock.now(), false)

// assert that after half a second, quotaBalance is now quota*0.5 = 3
assert.Equal(t, r.quotaBalance, 3.0)
assert.Equal(t, 3.0, r.quotaBalance)
}

// assert quotaBalance and capacity of borrowing case.
Expand Down
2 changes: 1 addition & 1 deletion samplers/aws/xray/internal/rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func TestTraceIDRatioBasedSamplerFixedRateZero(t *testing.T) {
now := time.Unix(1500000000, 0)
sd := r1.Sample(trace.SamplingParameters{}, now)

assert.Equal(t, sd.Decision, trace.Drop)
assert.Equal(t, trace.Drop, sd.Decision)
}

func TestAppliesToMatchingWithAllAttrs(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions samplers/aws/xray/remote_sampler_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func TestNewConfig(t *testing.T) {
cfg, err := newConfig(WithSamplingRulesPollingInterval(400*time.Second), WithEndpoint(*endpoint), WithLogger(logr.Logger{}))
require.NoError(t, err)

assert.Equal(t, cfg.samplingRulesPollingInterval, 400*time.Second)
assert.Equal(t, 400*time.Second, cfg.samplingRulesPollingInterval)
assert.Equal(t, cfg.endpoint, *endpoint)
assert.Equal(t, cfg.logger, logr.Logger{})
assert.Equal(t, logr.Logger{}, cfg.logger)
}

// assert that when user did not provide values are then config would be picked up from default values.
Expand All @@ -35,7 +35,7 @@ func TestDefaultConfig(t *testing.T) {
cfg, err := newConfig()
require.NoError(t, err)

assert.Equal(t, cfg.samplingRulesPollingInterval, 300*time.Second)
assert.Equal(t, 300*time.Second, cfg.samplingRulesPollingInterval)
assert.Equal(t, cfg.endpoint, *endpoint)
assert.Equal(t, cfg.logger, defaultLogger)
}
Expand All @@ -48,7 +48,7 @@ func TestPartialUserProvidedConfig(t *testing.T) {
cfg, err := newConfig(WithSamplingRulesPollingInterval(500 * time.Second))
require.NoError(t, err)

assert.Equal(t, cfg.samplingRulesPollingInterval, 500*time.Second)
assert.Equal(t, 500*time.Second, cfg.samplingRulesPollingInterval)
assert.Equal(t, cfg.endpoint, *endpoint)
assert.Equal(t, cfg.logger, defaultLogger)
}
Expand Down
2 changes: 1 addition & 1 deletion samplers/aws/xray/remote_sampler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ func TestRemoteSamplerDescription(t *testing.T) {
rs := &remoteSampler{}

s := rs.Description()
assert.Equal(t, s, "AWSXRayRemoteSampler{remote sampling with AWS X-Ray}")
assert.Equal(t, "AWSXRayRemoteSampler{remote sampling with AWS X-Ray}", s)
}
Loading
Loading