-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
dd9f2ce
commit 74281a5
Showing
6 changed files
with
30 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit # Exit the script with error if any of the commands fail | ||
set -o errexit # Exit the script with error if any of the commands fail | ||
|
||
bash $DRIVERS_TOOLS/.evergreen/secrets_handling/setup-secrets.sh drivers/enterprise_auth | ||
source secrets-export.sh | ||
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh | ||
|
||
npm run check:ldap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { expect } from 'chai'; | ||
|
||
import { MongoClient } from '../mongodb'; | ||
|
||
describe('LDAP', function () { | ||
const { SASL_USER, SASL_PASS, SASL_HOST } = process.env; | ||
|
||
const MONGODB_URI = `mongodb://${SASL_USER}:${SASL_PASS}@${SASL_HOST}?authMechanism=plain&authSource=$external`; | ||
|
||
it('Should correctly authenticate against ldap', async function () { | ||
const client = new MongoClient(MONGODB_URI); | ||
await client.connect(); | ||
|
||
const doc = await client.db('ldap').collection('test').findOne(); | ||
expect(doc).property('ldap').to.equal(true); | ||
|
||
await client.close(); | ||
}); | ||
}); |