-
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.
- Loading branch information
Showing
6 changed files
with
52 additions
and
117 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit # Exit the script with error if any of the commands fail | ||
|
||
export PROJECT_DIRECTORY="$(pwd)" | ||
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" | ||
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.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,26 @@ | ||
'use strict'; | ||
const MongoClient = require('../..').MongoClient; | ||
var test = require('../functional/shared').assert; | ||
|
||
describe('LDAP', function() { | ||
if (process.env.MONGODB_URI == null) { | ||
throw new Error(`skipping SSL tests, MONGODB_URI environment variable is not defined`); | ||
} | ||
|
||
it('Should correctly authenticate against ldap', function(done) { | ||
const client = new MongoClient(process.env.MONGODB_URI); | ||
client.connect(function(err, client) { | ||
test.equal(null, err); | ||
|
||
client | ||
.db('ldap') | ||
.collection('test') | ||
.findOne(function(err, doc) { | ||
test.equal(null, err); | ||
test.equal(true, doc.ldap); | ||
|
||
client.close(done); | ||
}); | ||
}); | ||
}); | ||
}); |