Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ If you need a new mock please update or add the `//go:generate` instruction to t

#### Compilation in VSCode

Please add the following line to your settings.json file :
```
Please add the following line to your `.vscode/settings.json` file :
```json
{
"go.buildTags": "unit,e2e",
"go.testTags": "unit,e2e"
}
```

This will enable compilation for unit and end-to-end tests.
Expand All @@ -95,7 +97,7 @@ This will enable compilation for unit and end-to-end tests.
To debug in VSCode, you must create a debug configuration for the command with the required arguments.
Run the following commands to create a new launch.json file for the debugger:

```
```shell
touch .vscode/launch.json
```
Then put the following example configuration into the file.
Expand Down Expand Up @@ -125,6 +127,36 @@ Review and replace the command name and arguments depending on the command you w
}
```

To debug e2e tests.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should this be a header Debugging E2E tests in VSCode?

Copy link
Collaborator Author

@fmenezes fmenezes Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, it is under a header #### Debugging in VSCode, it shows how to debug both unit tests and e2e tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah OK! got it.


```shell
touch .vscode/settings.json
```

Then put the following example configuration into the file.
Review and replace the atlas settings.

```json
{
"go.buildTags": "unit,e2e",
"go.testTags": "unit,e2e",
"go.testEnvVars": {
"ATLAS_E2E_BINARY": "${workspaceFolder}/bin/atlas",
"UPDATE_SNAPSHOTS": "skip",
"SNAPSHOTS_DIR": "${workspaceFolder}/test/e2e/testdata/.snapshots",
"GOCOVERDIR": "${workspaceFolder}/cov",
"DO_NOT_TRACK": "1",
"E2E_SKIP_CLEANUP": "false",
"MONGODB_ATLAS_ORG_ID": "<default org id>",
"MONGODB_ATLAS_PROJECT_ID": "<default project id>",
"MONGODB_ATLAS_PRIVATE_API_KEY": "<private key>",
"MONGODB_ATLAS_PUBLIC_API_KEY": "<public key>",
"MONGODB_ATLAS_OPS_MANAGER_URL": "https://cloud.mongodb.com/",
"MONGODB_ATLAS_SERVICE": "cloud",
}
}
```

### Contributing New Command Group

`Atlas CLI` uses the [Cobra Framework](https://umarcor.github.io/cobra/).
Expand Down
Loading