Skip to content

Commit 8e902d7

Browse files
authored
Merge pull request #975 from p-mongo/replica-set-uri-parameter
RUBY-1372 Translate replica set option to correct uri parameter
2 parents 3914d5e + 8d7c5d0 commit 8e902d7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spec/mongo/auth/scram/negotiation_spec.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ def authenticate!
2828

2929
describe 'SCRAM-SHA auth mechanism negotiation', if: scram_sha_256_enabled? do
3030

31+
URI_OPTION_MAP = {
32+
:auth_source => 'authsource',
33+
:replica_set => 'replicaSet',
34+
}
35+
3136
let(:create_user!) do
3237
ADMIN_AUTHORIZED_TEST_CLIENT.with(
3338
database: 'admin',
@@ -313,7 +318,8 @@ def authenticate!
313318
uri << (first ? '?' : '&')
314319
first = false
315320

316-
k = 'authsource' if k == :auth_source
321+
k = URI_OPTION_MAP[k] || k
322+
317323
uri << "#{k}=#{v}"
318324
end
319325
end

0 commit comments

Comments
 (0)