Skip to content

Commit e9df4f6

Browse files
committed
test: setup scripts
1 parent 48d897e commit e9df4f6

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

.evergreen/run-oidc-tests.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
set -o errexit # Exit the script with error if any of the commands fail
33
set -o xtrace # Write all commands first to stderr
44

5+
PROVIDER_NAME=${PROVIDER_NAME:-"aws"}
6+
PROJECT_DIRECTORY=${PROJECT_DIRECTORY:-"."}
57
source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh"
68

79
MONGODB_URI=${MONGODB_URI:-"mongodb://127.0.0.1:27017"}
8-
MONGODB_URI_SINGLE="${MONGODB_URI}/?authMechanism=MONGODB-OIDC&authMechanismProperties=DEVICE_NAME:aws"
910

10-
echo $MONGODB_URI_SINGLE
11-
12-
export MONGODB_URI="$MONGODB_URI_SINGLE"
1311
export OIDC_TOKEN_DIR=${OIDC_TOKEN_DIR}
1412

15-
npm run check:oidc
13+
if [ "$PROVIDER_NAME" = "azure" ]; then
14+
npm run check:oidc-azure
15+
else
16+
npm run check:oidc
17+
fi

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
"check:adl": "mocha --config test/mocha_mongodb.json test/manual/atlas-data-lake-testing",
128128
"check:aws": "nyc mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_aws.test.ts",
129129
"check:oidc": "mocha --config test/mocha_mongodb.json test/manual/mongodb_oidc.prose.test.ts",
130+
"check:oidc-azure": "mocha --config test/mocha_mongodb.json test/manual/mongodb_oidc_azure.prose.test.ts",
130131
"check:ocsp": "mocha --config test/manual/mocharc.json test/manual/ocsp_support.test.js",
131132
"check:kerberos": "nyc mocha --config test/manual/mocharc.json test/manual/kerberos.test.ts",
132133
"check:tls": "mocha --config test/manual/mocharc.json test/manual/tls_support.test.js",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { expect } from 'chai';
2+
3+
describe('MONGODB-OIDC (Azure)', function () {
4+
it('passes', function () {
5+
expect(true).to.be.true;
6+
});
7+
});

0 commit comments

Comments
 (0)