Skip to content

Commit 9eaabdd

Browse files
authored
chore(NODE-6957): add docs for container tests in CI (#4550)
1 parent f153c6f commit 9eaabdd

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

test/readme.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ about the types of tests and how to run them.
4040
- [Deployed Lambda Tests](#deployed-lambda-tests)
4141
- [Kerberos Tests](#kerberos-tests)
4242
- [AWS Authentication tests](#aws-authentication-tests)
43+
- [Container Tests](#container-tests)
4344
- [TODO Special Env Sections](#todo-special-env-sections)
4445
- [Testing driver changes with mongosh](#testing-driver-changes-with-mongosh)
4546
- [Point mongosh to the driver](#point-mongosh-to-the-driver)
@@ -651,6 +652,39 @@ Choose your AWS authentication credential type and export the `AWS_CREDENTIAL_TY
651652

652653
1. Run the `bash .evergreen/run-mongodb-aws-tests.sh`.
653654

655+
### Container Tests
656+
657+
It may become required to run tests or debug code inside a live Azure or GCP container. The best way to do this is to leverage
658+
our existing integration test suite and run Evergreen patches against a single integration test.
659+
660+
_Note that in cases where the tests need to run longer than one hour to ensure that tokens expire
661+
that the mocha timeout must be increased in order for the test not to timeout._
662+
663+
## GCP
664+
665+
1. Add a new GCP prose test to `test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts` that mimics the behaviour that
666+
needs to be tested.
667+
2. Ensure that the test has the `only` attribute so only it will run.
668+
3. For additional Node.js options (like HTTP debug), add them to `GCPOIDC_TEST_CMD` in `.evergreen/run-oidc-tests-gcp.sh`
669+
4. Create an evergreen patch and schedule only the `oidc-auth-test-gcp-latest` variant.
670+
671+
## Azure
672+
673+
1. Add a new Azure prose test to `test/integration/auth/mongodb_oidc_azure.prose.05.test.ts` that mimics the behaviour that
674+
needs to be tested.
675+
2. Ensure that the test has the `only` attribute so only it will run.
676+
3. For additional Node.js options (like HTTP debug), add them to `AZUREOIDC_TEST_CMD` in `.evergreen/run-oidc-tests-azure.sh`
677+
4. Create an evergreen patch and schedule only the `oidc-auth-test-azure-latest` variant.
678+
679+
## AWS
680+
681+
1. Add a new AWS prose test to `test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts` that mimics the behaviour that
682+
needs to be tested.
683+
2. Ensure that the test has the `only` attribute so only it will run.
684+
3. For additional Node.js options (like HTTP debug), add them to `K8S_TEST_CMD` in `.evergreen/run-oidc-tests-k8s.sh`
685+
4. Create an evergreen patch and schedule only the `oidc-auth-test-k8s-latest-aks` variant.
686+
687+
654688
### TODO Special Env Sections
655689

656690
- TLS

0 commit comments

Comments
 (0)