Skip to content

Commit 0c7f0be

Browse files
committed
PR feeedback:
- moved contents of run-aws-integ-tests.sh into readme - moved readme info around
1 parent 03ae48c commit 0c7f0be

2 files changed

Lines changed: 54 additions & 55 deletions

File tree

etc/run-aws-integ-tests.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

test/readme.md

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ about the types of tests and how to run them.
2727
- [Running Benchmarks](#running-benchmarks)
2828
- [Configuration](#configuration)
2929
- [Secrets](#secrets)
30+
- [CSFLE](#csfle)
31+
- [AWS Profile](#aws-profile)
3032
- [Testing with Special Environments](#testing-with-special-environments)
3133
- [Load Balanced](#load-balanced)
3234
- [Client-Side Field-Level Encryption (CSFLE)](#client-side-field-level-encryption-csfle)
@@ -39,7 +41,7 @@ about the types of tests and how to run them.
3941
- [Deployed Lambda Tests](#deployed-lambda-tests)
4042
- [Kerberos Tests](#kerberos-tests)
4143
- [AWS Authentication tests](#aws-authentication-tests)
42-
- [AWS Profile](#aws-profile)
44+
- [Running AWS tests](#running-aws-tests)
4345
- [Container Tests](#container-tests)
4446
- [GCP](#gcp)
4547
- [Azure](#azure)
@@ -369,6 +371,8 @@ Local use of secrets manager requires:
369371

370372
(see instructions in the secrets handling readme).
371373

374+
### CSFLE
375+
372376
Here's an example usage of the tooling in drivers-evergreen-tools that configures credentials for CSFLE:
373377

374378
```bash
@@ -383,6 +387,33 @@ source secrets-export.sh
383387
> [!IMPORTANT]
384388
> Make sure `secrets-export.sh` is in the .gitignore of any Github repo you might be using these tools in to avoid leaking credentials. This is already done for this repo.
385389
390+
### AWS Profile
391+
392+
These instructions will help you locally configure profile-based AWS credentials.
393+
394+
Setup an AWS_PROFILE locally to be able to use AWS and to run AWS tests locally.
395+
396+
1. Get SSO sign-in info from AWS
397+
1. Navigate to https://corp.mongodb.com/app/UserHome
398+
2. Open AWS
399+
3. Choose `Drivers` account
400+
4. Choose `drivers-test-secrets-role`
401+
5. Click `Access Keys`
402+
6. Copy down `SSO start URL` and `SSO Region`
403+
2. Sign in locally
404+
1. Run `aws configure sso-session`
405+
2. Pick a name, like `drivers-test-secrets-session`
406+
3. Specify `SSO start URL` and `SSO Region` from earlier steps
407+
3. Add a profile
408+
1. Add the following profile to `~/.aws/config`
409+
410+
```ini
411+
[profile drivers-test-secrets-role-857654397073]
412+
sso_session = drivers-test-secrets-session
413+
sso_account_id = 857654397073
414+
sso_role_name = drivers-test-secrets-role
415+
```
416+
386417
## Testing with Special Environments
387418

388419
In order to test some features, you will need to generate and set a specialized group of environment variables. The subsections below will walk you through how to generate and set the environment variables for these features.
@@ -650,30 +681,31 @@ Choose your AWS authentication credential type and export the `AWS_CREDENTIAL_TY
650681

651682
An example of performing the above is [`etc/run-aws-integ-tests.sh`](etc/run-aws-integ-tests.sh).
652683

653-
#### AWS Profile
684+
#### Running AWS tests
654685

655-
Setup an AWS_PROFILE locally to be able to use AWS and to run AWS tests locally.
686+
Once you have the AWS Profile configured locally (see section "AWS Profile" for more info), you can run tests like this:
656687

657-
1. Get SSO sign-in info from AWS
658-
1. Navigate to https://corp.mongodb.com/app/UserHome
659-
2. Open AWS
660-
3. Choose `Drivers` account
661-
4. Choose `drivers-test-secrets-role`
662-
5. Click `Access Keys`
663-
6. Copy down `SSO start URL` and `SSO Region`
664-
2. Sign in locally
665-
1. Run `aws configure sso-session`
666-
2. Pick a name, like `drivers-test-secrets-session`
667-
3. Specify `SSO start URL` and `SSO Region` from earlier steps
668-
3. Add a profile
669-
1. Add the following profile to `~/.aws/config`
688+
```sh
689+
export AWS_CREDENTIAL_TYPE="session-creds" # session-creds || env-creds
690+
export VERSION="latest"
691+
export NODE_LTS_VERSION="24"
692+
export AUTH="auth"
693+
export ORCHESTRATION_FILE="auth-aws.json"
694+
export TOPOLOGY="server"
695+
export NODE_DRIVER="$DRIVERS_TOOLS/.."
696+
export AWS_PROFILE="drivers-test-secrets-role-857654397073"
670697
671-
```ini
672-
[profile drivers-test-secrets-role-857654397073]
673-
sso_session = drivers-test-secrets-session
674-
sso_account_id = 857654397073
675-
sso_role_name = drivers-test-secrets-role
676-
```
698+
# Login with AWS Profile
699+
aws sso login --sso-session drivers-test-secrets-session
700+
701+
# Install dependencies
702+
bash ${NODE_DRIVER}/.evergreen/install-dependencies.sh
703+
704+
# Orchestration
705+
bash ${NODE_DRIVER}/.evergreen/run-orchestration.sh
706+
707+
bash ${NODE_DRIVER}/.evergreen/run-mongodb-aws-test.sh
708+
```
677709

678710
### Container Tests
679711

0 commit comments

Comments
 (0)