@@ -43,7 +43,7 @@ type output struct {
43
43
44
44
traceparent atomic.Bool
45
45
baggage atomic.Bool
46
- lastBaggage atomic.Value // Stores the last received baggage header value
46
+ baggageVals atomic.Value
47
47
}
48
48
49
49
func (b * output ) Setup (t * testing.T ) []framework.Option {
@@ -57,10 +57,10 @@ func (b *output) Setup(t *testing.T) []framework.Option {
57
57
58
58
if baggage := r .Header .Get ("baggage" ); baggage != "" {
59
59
b .baggage .Store (true )
60
- b .lastBaggage .Store (baggage )
60
+ b .baggageVals .Store (baggage )
61
61
} else {
62
62
b .baggage .Store (false )
63
- b .lastBaggage .Store ("" )
63
+ b .baggageVals .Store (baggage )
64
64
}
65
65
66
66
w .Write ([]byte (`OK` ))
@@ -136,7 +136,7 @@ func (b *output) Run(t *testing.T, ctx context.Context) {
136
136
assert .Equal (t , http .StatusOK , resp .StatusCode )
137
137
assert .True (t , b .traceparent .Load ())
138
138
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 ())
140
140
141
141
invokereq := runtime.InvokeBindingRequest {
142
142
Name : "http-binding-traceparent" ,
@@ -154,6 +154,6 @@ func (b *output) Run(t *testing.T, ctx context.Context) {
154
154
require .NotNil (t , invokeresp )
155
155
assert .True (t , b .traceparent .Load ())
156
156
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 ())
158
158
})
159
159
}
0 commit comments