Skip to content

Commit

Permalink
clarify test conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Apr 16, 2024
1 parent 94ef18d commit 13dc54c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions source/auth/tests/mongodb-oidc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ ______________________________________________________________________

## Unified Spec Tests

Drivers MUST run the unified spec tests in all supported OIDC environments.
Drivers MUST run the unified spec tests in all supported OIDC environments. Drivers MUST set the placeholder
authMechanism properties (`ENVIRONMENT` and `TOKEN_RESOURCE`, if applicable).

______________________________________________________________________

## Prose Tests
## Machine Authentication Flow Prose Tests

Drivers MUST run the machine prose tests when `OIDC_TOKEN_DIR` is set. Drivers can either set the `ENVIRONMENT:test`
auth mechanism property, or use a custom callback that also reads the file.

Drivers can also choose to run the machine prose tests on GCP or Azure VMs.

Drivers MUST implement all prose tests in this section. Unless otherwise noted, all `MongoClient` instances MUST be
configured with `retryReads=false`.

Drivers MUST run the prose tests in all supported OIDC environments.

> [!NOTE]
> For test cases that create fail points, drivers MUST either use a unique `appName` or explicitly remove the fail point
> callback to prevent interaction between test cases.
Expand All @@ -29,9 +33,6 @@ After setting up your OIDC
[environment](https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/auth_oidc/README.md),
source the `secrets-export.sh` file and use the associated env variables in your tests.

An OIDC configured client MUST set the appropriate `ENVIRONMENT` auth mechanism property and include a callback that
gets the appropriate token for the given environment.

### Callback Authentication

**1.1 Callback is called during authentication**
Expand Down Expand Up @@ -167,7 +168,7 @@ ______________________________________________________________________
Drivers that support the [Human Authentication Flow](../auth.md#human-authentication-flow) MUST implement all prose
tests in this section. Unless otherwise noted, all `MongoClient` instances MUST be configured with `retryReads=false`.

The human workflow tests MUST only be run when in `ENVIRONMENT:test`.
The human workflow tests MUST only be run when `OIDC_TOKEN_DIR` is set.

> [!NOTE]
> For test cases that create fail points, drivers MUST either use a unique `appName` or explicitly remove the fail point
Expand Down

0 comments on commit 13dc54c

Please sign in to comment.