Skip to content

Commit

Permalink
test: setup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed May 22, 2023
1 parent 48d897e commit e9df4f6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .evergreen/run-oidc-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
set -o errexit # Exit the script with error if any of the commands fail
set -o xtrace # Write all commands first to stderr

PROVIDER_NAME=${PROVIDER_NAME:-"aws"}
PROJECT_DIRECTORY=${PROJECT_DIRECTORY:-"."}
source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh"

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

echo $MONGODB_URI_SINGLE

export MONGODB_URI="$MONGODB_URI_SINGLE"
export OIDC_TOKEN_DIR=${OIDC_TOKEN_DIR}

npm run check:oidc
if [ "$PROVIDER_NAME" = "azure" ]; then
npm run check:oidc-azure
else
npm run check:oidc
fi
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"check:adl": "mocha --config test/mocha_mongodb.json test/manual/atlas-data-lake-testing",
"check:aws": "nyc mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_aws.test.ts",
"check:oidc": "mocha --config test/mocha_mongodb.json test/manual/mongodb_oidc.prose.test.ts",
"check:oidc-azure": "mocha --config test/mocha_mongodb.json test/manual/mongodb_oidc_azure.prose.test.ts",
"check:ocsp": "mocha --config test/manual/mocharc.json test/manual/ocsp_support.test.js",
"check:kerberos": "nyc mocha --config test/manual/mocharc.json test/manual/kerberos.test.ts",
"check:tls": "mocha --config test/manual/mocharc.json test/manual/tls_support.test.js",
Expand Down
7 changes: 7 additions & 0 deletions test/manual/mongodb_oidc_azure.prose.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { expect } from 'chai';

describe('MONGODB-OIDC (Azure)', function () {
it('passes', function () {
expect(true).to.be.true;
});
});

0 comments on commit e9df4f6

Please sign in to comment.