Skip to content

Commit 4db8fc9

Browse files
authored
fix: aws_lambda test fix (#1383)
* fix: aws_lambda test fix * use assert_equal * lint
1 parent 5c0b75b commit 4db8fc9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

instrumentation/aws_lambda/test/opentelemetry/instrumentation_test.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
_(last_span.hex_span_id.size).must_equal 16
7777
_(last_span.hex_trace_id.size).must_equal 32
7878
_(last_span.trace_flags.sampled?).must_equal true
79-
_(last_span.tracestate.to_h.to_s).must_equal '{}'
79+
80+
assert_equal last_span.tracestate, {}
8081
end
8182
end
8283

@@ -95,7 +96,8 @@
9596
_(last_span.hex_span_id.size).must_equal 16
9697
_(last_span.hex_trace_id.size).must_equal 32
9798
_(last_span.trace_flags.sampled?).must_equal true
98-
_(last_span.tracestate.to_h.to_s).must_equal '{"otel"=>"ff40ea9699e62af2-01"}'
99+
100+
assert_equal last_span.tracestate, { 'otel' => 'ff40ea9699e62af2-01' }
99101
end
100102
event_v1['headers'].delete('traceparent')
101103
event_v1['headers'].delete('tracestate')
@@ -195,7 +197,8 @@
195197
_(last_span.hex_span_id.size).must_equal 16
196198
_(last_span.hex_trace_id.size).must_equal 32
197199
_(last_span.trace_flags.sampled?).must_equal true
198-
_(last_span.tracestate.to_h.to_s).must_equal '{}'
200+
201+
assert_equal last_span.tracestate, {}
199202
end
200203
end
201204

0 commit comments

Comments
 (0)