Skip to content

Commit 9d9cf90

Browse files
committed
update tests
1 parent b7dc749 commit 9d9cf90

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

instrumentation/logger/test/opentelemetry/instrumentation/logger/patches/active_support_broadcast_logger_test.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838

3939
assert_equal 1, log_records.size
4040
assert_equal 'DEBUG', log_records.first.severity_text
41-
assert_equal body, log_records.first.body
41+
assert_includes log_records.first.body, 'DEBUG'
42+
assert_includes log_records.first.body, body
4243
end
4344
end
4445

@@ -59,7 +60,8 @@
5960

6061
assert_equal 1, log_records.size
6162
assert_equal 'ANY', log_records.first.severity_text
62-
assert_equal body, log_records.first.body
63+
assert_includes log_records.first.body, 'ANY'
64+
assert_includes log_records.first.body, body
6365
end
6466
end
6567

@@ -81,7 +83,8 @@
8183

8284
assert_equal 1, log_records.size
8385
assert_equal severity.upcase, log_records.first.severity_text
84-
assert_equal body, log_records.first.body
86+
assert_includes log_records.first.body, severity.upcase
87+
assert_includes log_records.first.body, body
8588
end
8689
end
8790
end

instrumentation/logger/test/opentelemetry/instrumentation/logger/patches/logger_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242

4343
Time.stub(:now, timestamp) do
4444
ruby_logger.debug(msg)
45-
assert_equal(msg, log_record.body)
45+
assert_includes(log_record.body, msg)
46+
assert_includes(log_record.body, 'DEBUG')
4647
assert_equal('DEBUG', log_record.severity_text)
4748
assert_equal(5, log_record.severity_number)
4849
assert_equal(nano_timestamp, log_record.timestamp)

0 commit comments

Comments
 (0)