|
Alternatively, we can use a test similar to the Initial DNS Seedlist Discovery Spec tests we already have, and not involve Atlas. Create a 3-node replica set with SSL on ports 27017, 27018, and 27019, just like in the spec tests. But also configure auth: create username "bob" with password "pwd123" in database "thisDB", with role "readWriteAnyDatabase". Mongo Orchestration does this correctly if we add to the config JSON file:
"login": "bob",
|
"password": "pwd123",
|
"authSource": "thisDB",
|
Here's a full config from the C Driver.
Add this JSON test:
{
|
"uri": "mongodb+srv://bob:pwd123@test5.test.build.10gen.cc/",
|
"seeds": [
|
"localhost.test.build.10gen.cc:27017"
|
],
|
"hosts": [
|
"localhost:27017",
|
"localhost:27018",
|
"localhost:27019"
|
],
|
"options": {
|
"replicaSet": "repl0",
|
"authSource": "thisDB",
|
"ssl": true
|
}
|
}
|
We can use the same test runner that we wrote for the spec tests, so long as the runner actually attempts a read or write operation that proves authentication succeeded.
|