Skip to content

Commit e4eb831

Browse files
committed
align output binding with other tests
Signed-off-by: Cassandra Coyle <[email protected]>
1 parent beae30b commit e4eb831

File tree

1 file changed

+5
-5
lines changed
  • tests/integration/suite/daprd/tracing/binding

1 file changed

+5
-5
lines changed

tests/integration/suite/daprd/tracing/binding/output.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type output struct {
4343

4444
traceparent atomic.Bool
4545
baggage atomic.Bool
46-
lastBaggage atomic.Value // Stores the last received baggage header value
46+
baggageVals atomic.Value
4747
}
4848

4949
func (b *output) Setup(t *testing.T) []framework.Option {
@@ -57,10 +57,10 @@ func (b *output) Setup(t *testing.T) []framework.Option {
5757

5858
if baggage := r.Header.Get("baggage"); baggage != "" {
5959
b.baggage.Store(true)
60-
b.lastBaggage.Store(baggage)
60+
b.baggageVals.Store(baggage)
6161
} else {
6262
b.baggage.Store(false)
63-
b.lastBaggage.Store("")
63+
b.baggageVals.Store(baggage)
6464
}
6565

6666
w.Write([]byte(`OK`))
@@ -136,7 +136,7 @@ func (b *output) Run(t *testing.T, ctx context.Context) {
136136
assert.Equal(t, http.StatusOK, resp.StatusCode)
137137
assert.True(t, b.traceparent.Load())
138138
assert.True(t, b.baggage.Load())
139-
assert.Equal(t, "key1=value1,key2=value2", b.lastBaggage.Load())
139+
assert.Equal(t, "key1=value1,key2=value2", b.baggageVals.Load())
140140

141141
invokereq := runtime.InvokeBindingRequest{
142142
Name: "http-binding-traceparent",
@@ -154,6 +154,6 @@ func (b *output) Run(t *testing.T, ctx context.Context) {
154154
require.NotNil(t, invokeresp)
155155
assert.True(t, b.traceparent.Load())
156156
assert.True(t, b.baggage.Load())
157-
assert.Equal(t, "key1=value1,key2=value2", b.lastBaggage.Load())
157+
assert.Equal(t, "key1=value1,key2=value2", b.baggageVals.Load())
158158
})
159159
}

0 commit comments

Comments
 (0)