Skip to content

Commit fc8d3a1

Browse files
committed
Update test expectations based on latest mongo gem
This commit updates the test expectation for an updated message string. The same behavior is observbed, the message has just been updated. This commit also updates construction of a test mongodb client with a newly required value for auth_source when building a simple client.
1 parent 56e0cf8 commit fc8d3a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

instrumentation/mongo/test/opentelemetry/instrumentation/mongo/subscriber_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ module MongoTraceTest
380380
_(span.events[0].name).must_equal 'exception'
381381
_(span.events[0].timestamp).must_be_kind_of Integer
382382
_(span.events[0].attributes['exception.type']).must_equal 'CommandFailed'
383-
_(span.events[0].attributes['exception.message']).must_equal 'ns not found (26)'
383+
_(span.events[0].attributes['exception.message']).must_equal '[26:NamespaceNotFound]: ns not found'
384384
end
385385

386386
describe 'that triggers #failed before #started' do
@@ -402,7 +402,8 @@ module MongoTraceTest
402402
database: TestHelper.database,
403403
auth_mech: :plain,
404404
user: 'plain_user',
405-
password: 'plain_pass'
405+
password: 'plain_pass',
406+
auth_source: '$external'
406407
}
407408
end
408409

0 commit comments

Comments
 (0)