623 lines (610 loc) · 26 KB
/
acceptance-tests-runner.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
name: 'Acceptance Tests Execution'
run-name: 'Acceptance Tests Execution ${{ inputs.test_group }}'
# Called by acceptance-tests.yml workflow to run acceptance tests. Input and secret variables are defined by the caller depending if `dev` or `qa` cloud env is used.
on:
workflow_call:
inputs:
terraform_version:
description: 'Terraform version to use, e.g. 1.6.x, empty for latest'
type: string
required: true
test_group:
description: 'Test group to run, e.g. advanced_cluster, empty for all'
type: string
required: false
ref:
description: 'The branch, tag or SHA where tests will run, e.g. v1.14.0, empty for default branch'
type: string
required: false
mongodb_atlas_org_id:
type: string
required: true
mongodb_atlas_base_url:
type: string
required: true
mongodb_atlas_project_owner_id:
type: string
required: true
mongodb_atlas_teams_ids:
type: string
required: true
mongodb_atlas_username:
type: string
required: true
azure_atlas_app_id:
type: string
required: true
azure_service_principal_id:
type: string
required: true
azure_tenant_id:
type: string
required: true
aws_secret_name:
type: string
required: true
aws_region_federation:
type: string
required: true
mongodb_atlas_federation_settings_id:
type: string
required: true
mongodb_atlas_federated_okta_idp_id:
type: string
required: true
mongodb_atlas_federated_idp_id:
type: string
required: true
mongodb_atlas_federated_oidc_idp_id:
type: string
required: true
mongodb_atlas_federated_sso_url:
type: string
required: true
mongodb_atlas_federated_issuer_uri:
type: string
required: true
mongodb_atlas_federated_org_id:
type: string
required: true
secrets: # all secrets are passed explicitly in this workflow
mongodb_atlas_public_key:
required: true
mongodb_atlas_private_key:
required: true
ca_cert:
required: true
aws_account_id:
required: true
aws_access_key_id:
required: true
aws_secret_access_key:
required: true
aws_s3_bucket_federation:
required: true
mongodb_atlas_ldap_hostname:
required: true
mongodb_atlas_ldap_username:
required: true
mongodb_atlas_ldap_password:
required: true
mongodb_atlas_ldap_port:
required: true
mongodb_atlas_ldap_ca_certificate:
required: true
env:
TF_ACC: 1
TF_LOG: ${{ vars.LOG_LEVEL }}
ACCTEST_TIMEOUT: ${{ vars.ACCTEST_TIMEOUT }}
MONGODB_ATLAS_BASE_URL: ${{ inputs.mongodb_atlas_base_url }}
MONGODB_ATLAS_ORG_ID: ${{ inputs.mongodb_atlas_org_id }}
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.mongodb_atlas_public_key }}
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.mongodb_atlas_private_key }}
jobs:
change-detection:
runs-on: ubuntu-latest
env:
mustTrigger: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.test_group == '') }}
outputs:
cluster_outage_simulation: ${{ steps.filter.outputs.cluster_outage_simulation == 'true' || env.mustTrigger == 'true' }}
advanced_cluster: ${{ steps.filter.outputs.advanced_cluster == 'true' || env.mustTrigger == 'true' }}
cluster: ${{ steps.filter.outputs.cluster == 'true' || env.mustTrigger == 'true' }}
search_deployment: ${{ steps.filter.outputs.search_deployment == 'true' || env.mustTrigger == 'true' }}
stream: ${{ steps.filter.outputs.stream == 'true' || env.mustTrigger == 'true' }}
generic: ${{ steps.filter.outputs.generic == 'true' || env.mustTrigger == 'true' }}
backup: ${{ steps.filter.outputs.backup == 'true' || env.mustTrigger == 'true' }}
project: ${{ steps.filter.outputs.project == 'true' || env.mustTrigger == 'true' }}
serverless: ${{ steps.filter.outputs.serverless == 'true' || env.mustTrigger == 'true' }}
network: ${{ steps.filter.outputs.network == 'true' || env.mustTrigger == 'true' }}
config: ${{ steps.filter.outputs.config == 'true' || env.mustTrigger == 'true' }}
assume_role: ${{ steps.filter.outputs.assume_role == 'true' || env.mustTrigger == 'true' }}
event_trigger: ${{ steps.filter.outputs.event_trigger == 'true' || env.mustTrigger == 'true' }}
search_index: ${{ steps.filter.outputs.search_index == 'true' || env.mustTrigger == 'true' }}
federated: ${{ steps.filter.outputs.federated == 'true' || env.mustTrigger == 'true' }}
data_lake: ${{ steps.filter.outputs.data_lake == 'true' || env.mustTrigger == 'true' }}
ldap: ${{ steps.filter.outputs.ldap == 'true' || env.mustTrigger == 'true' }}
encryption: ${{ steps.filter.outputs.encryption == 'true' || env.mustTrigger == 'true' }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
if: ${{ inputs.test_group == '' && env.mustTrigger == 'false' }}
with:
filters: |
assume_role:
- 'internal/provider/*.go'
cluster_outage_simulation:
- 'internal/service/clusteroutagesimulation/*.go'
advanced_cluster:
- 'internal/service/advancedcluster/*.go'
cluster:
- 'internal/service/cluster/*.go'
- 'internal/service/globalclusterconfig/*.go'
search_deployment:
- 'internal/service/searchdeployment/*.go'
stream:
- 'internal/service/streaminstance/*.go'
- 'internal/service/streamconnection/*.go'
generic:
- 'internal/service/backupcompliancepolicy/*.go'
- 'internal/service/auditing/*.go'
- 'internal/service/x509authenticationdatabaseuser/*.go'
backup:
- 'internal/service/onlinearchive/*.go'
- 'internal/service/cloudbackupschedule/*.go'
- 'internal/service/cloudbackupsnapshot/*.go'
- 'internal/service/cloudbackupsnapshotexportbucket/*.go'
- 'internal/service/cloudbackupsnapshotexportjob/*.go'
- 'internal/service/cloudbackupsnapshotrestorejob/*.go'
project:
- 'internal/service/project/*.go'
- 'internal/service/projectipaccesslist/*.go'
- 'internal/service/accesslistapikey/*.go'
- 'internal/service/projectinvitation/*.go'
serverless:
- 'internal/service/serverlessinstance/*.go'
- 'internal/service/privatelinkendpointserverless/*.go'
- 'internal/service/privatelinkendpointserviceserverless/*.go'
network:
- 'internal/service/networkcontainer/*.go'
- 'internal/service/networkpeering/*.go'
- 'internal/service/privateendpointregionalmode/*.go'
- 'internal/service/privatelinkendpoint/*.go'
- 'internal/service/privatelinkendpointservice/*.go'
- 'internal/service/privatelinkendpointservicedatafederationonlinearchive/*.go'
config:
- 'internal/service/alertconfiguration/*.go'
- 'internal/service/atlasuser/*.go'
- 'internal/service/databaseuser/*.go'
- 'internal/service/projectapikey/*.go'
- 'internal/service/apikey/*.go'
- 'internal/service/teams/*.go'
- 'internal/service/cloudprovideraccess/*.go'
- 'internal/service/customdbrole/*.go'
- 'internal/service/maintenancewindow/*.go'
- 'internal/service/customdnsconfigurationclusteraws/*.go'
- 'internal/service/rolesorgid/*.go'
- 'internal/service/orginvitation/*.go'
- 'internal/service/organization/*.go'
- 'internal/service/thirdpartyintegration/*.go'
event_trigger:
- 'internal/service/eventtrigger/*.go'
search_index:
- 'internal/service/searchindex/*.go'
federated:
- 'internal/service/federatedsettingsidentityprovider/*.go'
- 'internal/service/federateddatabaseinstance/*.go'
- 'internal/service/federatedsettingsorgconfig/*.go'
- 'internal/service/federatedsettingsorgrolemapping/*.go'
- 'internal/service/federatedquerylimit/*.go'
data_lake:
- 'internal/service/datalakepipeline/*.go'
ldap:
- 'internal/service/ldapconfiguration/*.go'
- 'internal/service/ldapverify/*.go'
encryption:
- 'internal/service/encryptionatrest/*.go'
cluster_outage_simulation:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.cluster_outage_simulation == 'true' || inputs.test_group == 'cluster_outage_simulation' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccOutageSimulationCluster"
run: make testacc
advanced_cluster:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.advanced_cluster == 'true' || inputs.test_group == 'advanced_cluster' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccClusterAdvancedCluster"
run: make testacc
cluster:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.cluster == 'true' || inputs.test_group == 'cluster' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccClusterRS"
run: make testacc
search_deployment:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.search_deployment == 'true' || inputs.test_group == 'search_deployment' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccSearchDeployment"
run: make testacc
stream:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.stream == 'true' || inputs.test_group == 'stream' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
MONGODB_ATLAS_ENABLE_BETA: ${{ vars.MONGODB_ATLAS_ENABLE_BETA }}
TEST_REGEX: "^TestAccStream"
run: make testacc
generic: # Acceptance tests that do not use any time-consuming resource (example: cluster)
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.generic == 'true' || inputs.test_group == 'generic' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ inputs.mongodb_atlas_project_owner_id }}
CA_CERT: ${{ secrets.ca_cert }}
TEST_REGEX: "^TestAccGeneric"
run: |
make testacc
backup:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.backup == 'true' || inputs.test_group == 'backup' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ inputs.mongodb_atlas_project_owner_id }}
TEST_REGEX: "^TestAccBackup"
run: make testacc
project:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.project == 'true' || inputs.test_group == 'project' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ inputs.mongodb_atlas_project_owner_id }}
MONGODB_ATLAS_TEAMS_IDS: ${{ inputs.mongodb_atlas_teams_ids }}
AWS_ACCOUNT_ID: ${{ secrets.aws_account_id }}
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_SECURITY_GROUP_1: ${{ vars.AWS_SECURITY_GROUP_1 }}
AWS_SECURITY_GROUP_2: ${{ vars.AWS_SECURITY_GROUP_2 }}
AWS_VPC_CIDR_BLOCK: ${{ vars.AWS_VPC_CIDR_BLOCK }}
AWS_VPC_ID: ${{ vars.AWS_VPC_ID }}
TEST_REGEX: "^TestAccProject"
run: make testacc
serverless:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.serverless == 'true' || inputs.test_group == 'serverless' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccServerless"
run: make testacc
network:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.network == 'true' || inputs.test_group == 'network' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
AWS_ACCOUNT_ID: ${{ secrets.aws_account_id }}
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_SECURITY_GROUP_1: ${{ vars.AWS_SECURITY_GROUP_1 }}
AWS_SECURITY_GROUP_2: ${{ vars.AWS_SECURITY_GROUP_2 }}
AWS_VPC_CIDR_BLOCK: ${{ vars.AWS_VPC_CIDR_BLOCK }}
AWS_VPC_ID: ${{ vars.AWS_VPC_ID }}
TEST_REGEX: "^TestAccNetwork"
run: make testacc
config:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.config == 'true' || inputs.test_group == 'config' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
MONGODB_ATLAS_PROJECT_OWNER_ID: ${{ inputs.mongodb_atlas_project_owner_id }}
MONGODB_ATLAS_USERNAME: ${{ inputs.mongodb_atlas_username }}
AZURE_ATLAS_APP_ID: ${{ inputs.azure_atlas_app_id }}
AZURE_SERVICE_PRINCIPAL_ID: ${{ inputs.azure_service_principal_id }}
AZURE_TENANT_ID: ${{ inputs.azure_tenant_id }}
TEST_REGEX: "^TestAccConfig"
run: make testacc
assume_role:
needs: [ change-detection]
if: ${{ needs.change-detection.outputs.assume_role == 'true' || inputs.test_group == 'assume_role' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- id: sts-assume-role
name: Generate STS Temporary credential for acceptance testing
shell: bash
env:
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
ASSUME_ROLE_ARN: ${{ vars.ASSUME_ROLE_ARN }}
run: bash ./scripts/generate-credentials-with-sts-assume-role.sh
- name: Acceptance Tests
env:
MONGODB_ATLAS_PUBLIC_KEY: ""
MONGODB_ATLAS_PRIVATE_KEY: ""
ASSUME_ROLE_ARN: ${{ vars.ASSUME_ROLE_ARN }}
AWS_REGION: ${{ vars.AWS_REGION }}
STS_ENDPOINT: ${{ vars.STS_ENDPOINT }}
SECRET_NAME: ${{ inputs.aws_secret_name }}
AWS_ACCESS_KEY_ID: ${{ steps.sts-assume-role.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.sts-assume-role.outputs.aws_secret_access_key }}
AWS_SESSION_TOKEN: ${{ steps.sts-assume-role.outputs.AWS_SESSION_TOKEN }}
TEST_REGEX: "^TestAccSTSAssumeRole"
run: make testacc
search_index:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.search_index == 'true' || inputs.test_group == 'search_index' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccSearchIndex"
run: make testacc
federated:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.federated == 'true' || inputs.test_group == 'federated' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
MONGODB_ATLAS_FEDERATION_SETTINGS_ID: ${{ inputs.mongodb_atlas_federation_settings_id }}
MONGODB_ATLAS_FEDERATED_OKTA_IDP_ID: ${{ inputs.mongodb_atlas_federated_okta_idp_id }}
MONGODB_ATLAS_FEDERATED_IDP_ID: ${{ inputs.mongodb_atlas_federated_idp_id }}
MONGODB_ATLAS_FEDERATED_OIDC_IDP_ID: ${{ inputs.mongodb_atlas_federated_oidc_idp_id }}
MONGODB_ATLAS_FEDERATED_SSO_URL: ${{ inputs.mongodb_atlas_federated_sso_url }}
MONGODB_ATLAS_FEDERATED_ISSUER_URI: ${{ inputs.mongodb_atlas_federated_issuer_uri }}
MONGODB_ATLAS_FEDERATED_ORG_ID: ${{ inputs.mongodb_atlas_federated_org_id }}
AWS_S3_BUCKET: ${{ secrets.aws_s3_bucket_federation }}
AWS_REGION: ${{ vars.aws_region_federation }}
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
TEST_REGEX: "^TestAccFederated"
run: make testacc
data_lake:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.data_lake == 'true' || inputs.test_group == 'data_lake' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccDataLake"
run: make testacc
ldap:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.ldap == 'true' || inputs.test_group == 'ldap' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
MONGODB_ATLAS_LDAP_HOSTNAME: ${{ secrets.mongodb_atlas_ldap_hostname }}
MONGODB_ATLAS_LDAP_USERNAME: ${{ secrets.mongodb_atlas_ldap_username }}
MONGODB_ATLAS_LDAP_PASSWORD: ${{ secrets.mongodb_atlas_ldap_password }}
MONGODB_ATLAS_LDAP_PORT: ${{ secrets.mongodb_atlas_ldap_port }}
MONGODB_ATLAS_LDAP_CA_CERTIFICATE: ${{ secrets.mongodb_atlas_ldap_ca_certificate }}
TEST_REGEX: "^TestAccLDAP"
run: make testacc
encryption:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.encryption == 'true' || inputs.test_group == 'encryption' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccEncryption"
run: make testacc
event_trigger:
needs: [ change-detection ]
if: ${{ needs.change-detection.outputs.event_trigger == 'true' || inputs.test_group == 'event_trigger' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false
- name: Acceptance Tests
env:
TEST_REGEX: "^TestAccEventTrigger"
run: make testacc