Skip to content

Commit 3783d4f

Browse files
authored
CLOUDP-342259: Fix e2e test clean up (#4193)
1 parent 12793a2 commit 3783d4f

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

.github/workflows/code-health.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ jobs:
341341
CONFIG_PATH: ${{ steps.config-path.outputs.CONFIG_PATH }}
342342
CONFIG_CONTENT: |
343343
skip_update_check = true
344+
telemetry_enabled = false
344345
345346
[__e2e]
346347
org_id = 'a0123456789abcdef012345a'
@@ -349,7 +350,6 @@ jobs:
349350
private_api_key = '12345678-abcd-ef01-2345-6789abcdef01'
350351
ops_manager_url = 'http://localhost:8080/'
351352
service = 'cloud'
352-
telemetry_enabled = false
353353
output = 'plaintext'
354354
355355
[__e2e_snapshot]
@@ -359,7 +359,6 @@ jobs:
359359
private_api_key = '12345678-abcd-ef01-2345-6789abcdef01'
360360
ops_manager_url = 'http://localhost:8080/'
361361
service = 'cloud'
362-
telemetry_enabled = false
363362
output = 'plaintext'
364363
run: |
365364
echo "$CONFIG_CONTENT" > "$CONFIG_PATH"

.github/workflows/update-e2e-tests.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
CONFIG_PATH: ${{ steps.config-path.outputs.CONFIG_PATH }}
8585
CONFIG_CONTENT: |
8686
skip_update_check = true
87+
telemetry_enabled = false
8788
8889
[__e2e]
8990
org_id = 'a0123456789abcdef012345a'
@@ -92,7 +93,6 @@ jobs:
9293
private_api_key = '12345678-abcd-ef01-2345-6789abcdef01'
9394
ops_manager_url = 'http://localhost:8080/'
9495
service = 'cloud'
95-
telemetry_enabled = false
9696
output = 'plaintext'
9797
9898
[__e2e_snapshot]
@@ -102,7 +102,6 @@ jobs:
102102
private_api_key = '12345678-abcd-ef01-2345-6789abcdef01'
103103
ops_manager_url = 'http://localhost:8080/'
104104
service = 'cloud'
105-
telemetry_enabled = false
106105
output = 'plaintext'
107106
MONGODB_ATLAS_ORG_ID: ${{ secrets.MONGODB_ATLAS_ORG_ID }}
108107
MONGODB_ATLAS_PROJECT_ID: ${{ secrets.MONGODB_ATLAS_PROJECT_ID }}
@@ -175,15 +174,15 @@ jobs:
175174
CONFIG_PATH: ${{ steps.config-path.outputs.CONFIG_PATH }}
176175
CONFIG_CONTENT: |
177176
skip_update_check = true
177+
telemetry_enabled = false
178178
179179
[__e2e]
180-
org_id = '${{ secrets.MONGODB_ATLAS_ORG_ID }}'
181-
project_id = '${{ secrets.MONGODB_ATLAS_PROJECT_ID }}'
182-
public_api_key = '${{ secrets.MONGODB_ATLAS_PROJECT_ID }}'
183-
private_api_key = '${{ secrets.MONGODB_ATLAS_PRIVATE_API_KEY }}'
184-
ops_manager_url = '${{ secrets.MONGODB_ATLAS_OPS_MANAGER_URL }}'
180+
org_id = 'a0123456789abcdef012345a'
181+
project_id = 'b0123456789abcdef012345b'
182+
public_api_key = 'ABCDEF01'
183+
private_api_key = '12345678-abcd-ef01-2345-6789abcdef01'
184+
ops_manager_url = 'http://localhost:8080/'
185185
service = 'cloud'
186-
telemetry_enabled = false
187186
output = 'plaintext'
188187
189188
[__e2e_snapshot]
@@ -193,10 +192,14 @@ jobs:
193192
private_api_key = '12345678-abcd-ef01-2345-6789abcdef01'
194193
ops_manager_url = 'http://localhost:8080/'
195194
service = 'cloud'
196-
telemetry_enabled = false
197195
output = 'plaintext'
198196
run: |
199197
echo "$CONFIG_CONTENT" > "$CONFIG_PATH"
198+
./bin/atlas config set org_id "$MONGODB_ATLAS_ORG_ID" -P __e2e
199+
./bin/atlas config set project_id "$MONGODB_ATLAS_PROJECT_ID" -P __e2e
200+
./bin/atlas config set public_api_key "$MONGODB_ATLAS_PUBLIC_API_KEY" -P __e2e
201+
./bin/atlas config set private_api_key "$MONGODB_ATLAS_PRIVATE_API_KEY" -P __e2e
202+
./bin/atlas config set ops_manager_url "$MONGODB_ATLAS_OPS_MANAGER_URL" -P __e2e
200203
- run: make e2e-test
201204
env:
202205
TEST_CMD: gotestsum --junitfile e2e-tests.xml --format standard-verbose --
@@ -211,6 +214,9 @@ jobs:
211214
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
212215
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
213216
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
217+
MONGODB_ATLAS_ORG_ID: ${{ secrets.MONGODB_ATLAS_ORG_ID }}
218+
MONGODB_ATLAS_PROJECT_ID: ${{ secrets.MONGODB_ATLAS_PROJECT_ID }}
219+
MONGODB_ATLAS_OPS_MANAGER_URL: ${{ secrets.MONGODB_ATLAS_OPS_MANAGER_URL }}
214220
E2E_TIMEOUT: 3h
215221
- name: Test Summary
216222
if: always()

scripts/add-e2e-profiles.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ set -euo pipefail
2020
# Prompt if user wants to use cloud-dev.mongodb.com
2121
read -p "Do you want to set ops_manager_url to cloud-dev.mongodb.com? [Y/n] " -n 1 -r
2222
echo
23-
if [[ $REPLY =~ ^[Yy]$ ]]; then
24-
ops_manager_url="https://cloud-dev.mongodb.com/"
23+
if [[ -z "$REPLY" || $REPLY =~ ^[Yy]$ ]]; then
24+
ops_manager_url="https://cloud-dev.mongodb.com/" # Default to cloud-dev.mongodb.com
2525
else
26-
ops_manager_url="https://cloud.mongodb.com/" # Default to cloud.mongodb.com
26+
ops_manager_url="https://cloud.mongodb.com/"
2727
fi
2828

2929
./bin/atlas config set ops_manager_url $ops_manager_url -P __e2e

0 commit comments

Comments
 (0)