Skip to content

Commit cce1326

Browse files
fix: added mac fixes for docker + QoL improvements for running automation tests locally
1 parent 2fa0f10 commit cce1326

40 files changed

Lines changed: 284 additions & 133 deletions

File tree

.vscode/tasks.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@
2323
"cwd": "./application/CohortManager"
2424
},
2525
},
26+
{
27+
"label": "Spin up Docker for E2E regression (build + start)",
28+
"type": "shell",
29+
"osx": {
30+
"command": "podman compose down && podman compose -f compose.core.yaml build && podman compose -f compose.cohort-distribution.yaml build && podman compose -f compose.data-services.yaml build && podman compose -f compose.deps.yaml up -d && (podman compose -f compose.deps.yaml up --build db-migration || true) && (podman compose -f compose.deps.yaml rm -f db-migration || true) && podman compose down && podman compose --profile \"service-now\" --profile \"bs-select\" --profile \"non-essential\" up -d"
31+
},
32+
"windows": {
33+
"command": "docker compose down && docker compose -f compose.core.yaml build && docker compose -f compose.cohort-distribution.yaml build && docker compose -f compose.data-services.yaml build && docker compose -f compose.deps.yaml up -d && (docker compose -f compose.deps.yaml up --build db-migration || true) && (docker compose -f compose.deps.yaml rm -f db-migration || true) && docker compose down && docker compose --profile \"service-now\" --profile \"bs-select\" --profile \"non-essential\" up -d",
34+
"options": {
35+
"shell": { "executable": "wsl.exe" }
36+
}
37+
},
38+
"options": {
39+
"cwd": "./application/CohortManager"
40+
},
41+
"presentation": {
42+
"reveal": "always",
43+
"panel": "new"
44+
}
45+
},
2646
{
2747
"label": "Restart application",
2848
"type": "shell",
@@ -642,6 +662,58 @@
642662
"hide": true
643663
}
644664
}
665+
},
666+
{
667+
"label": "E2E: Epic1 regression (reuse containers)",
668+
"type": "shell",
669+
"osx": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic1" },
670+
"windows": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic1", "options": { "shell": { "executable": "wsl.exe" } } },
671+
"options": { "cwd": "./tests/playwright-tests" },
672+
"presentation": { "reveal": "always", "panel": "new" }
673+
},
674+
{
675+
"label": "E2E: Epic2 regression (reuse containers)",
676+
"type": "shell",
677+
"osx": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic2" },
678+
"windows": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic2", "options": { "shell": { "executable": "wsl.exe" } } },
679+
"options": { "cwd": "./tests/playwright-tests" },
680+
"presentation": { "reveal": "always", "panel": "new" }
681+
},
682+
{
683+
"label": "E2E: Epic3 regression (reuse containers)",
684+
"type": "shell",
685+
"osx": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic3" },
686+
"windows": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic3", "options": { "shell": { "executable": "wsl.exe" } } },
687+
"options": { "cwd": "./tests/playwright-tests" },
688+
"presentation": { "reveal": "always", "panel": "new" }
689+
},
690+
{
691+
"label": "E2E: Epic4C regression (reuse containers)",
692+
"type": "shell",
693+
"osx": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic4c" },
694+
"windows": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic4c", "options": { "shell": { "executable": "wsl.exe" } } },
695+
"options": { "cwd": "./tests/playwright-tests" },
696+
"presentation": { "reveal": "always", "panel": "new" }
697+
},
698+
{
699+
"label": "E2E: Epic4D regression (reuse containers)",
700+
"type": "shell",
701+
"osx": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic4d" },
702+
"windows": { "command": "node scripts/health-check.js && npm run test:regression_e2e_epic4d", "options": { "shell": { "executable": "wsl.exe" } } },
703+
"options": { "cwd": "./tests/playwright-tests" },
704+
"presentation": { "reveal": "always", "panel": "new" }
705+
},
706+
{
707+
"label": "Prune: Podman/Docker build cache",
708+
"type": "shell",
709+
"osx": {
710+
"command": "set +e; echo 'Pruning Podman build cache…'; podman builder prune -a -f; echo 'Podman disk usage:'; podman system df"
711+
},
712+
"windows": {
713+
"command": "set +e && echo Pruning Docker build cache… && docker builder prune -a -f && echo Docker disk usage: && docker system df",
714+
"options": { "shell": { "executable": "wsl.exe" } }
715+
},
716+
"presentation": { "reveal": "always", "panel": "new" }
645717
}
646718
]
647719
}

application/CohortManager/compose.cohort-distribution.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ services:
44
distribute-participant:
55
container_name: distribute-participant
66
image: cohort-manager-distribute-participant
7+
platform: "linux/amd64"
78
networks: [cohman-network]
89
build:
910
context: ./src/Functions/
@@ -30,38 +31,44 @@ services:
3031
retrieve-cohort-distribution-data:
3132
container_name: retrieve-cohort-distribution-data
3233
image: cohort-manager-retrieve-cohort-distribution-data
34+
platform: "linux/amd64"
3335
networks: [cohman-network]
3436
build:
3537
context: ./src/Functions/
3638
dockerfile: CohortDistributionServices/RetrieveCohortDistribution/Dockerfile
3739
profiles: [bs-select]
40+
ports:
41+
- "7078:7078"
3842
environment:
3943
- ASPNETCORE_URLS=http://*:7078
4044
- DtOsDatabaseConnectionString=Server=db,1433;Database=${DB_NAME};User Id=SA;Password=${PASSWORD};TrustServerCertificate=True
4145
- ExceptionFunctionURL=http://create-exception:7070/api/CreateException
4246
- CohortDistributionDataServiceURL=http://cohort-distribution-data-service:7992/api/CohortDistributionDataService/
43-
- BsSelectRequestAuditDataService=http://bs-select-request-audit-data-service:7956/api/BsSelectRequestAuditDataService/
47+
- BsSelectRequestAuditDataService=http://bs-request-audit-data-service:7956/api/BsSelectRequestAuditDataService/
4448
- AcceptableLatencyThresholdMs=500
45-
- CohortDistributionDataServiceURL=http://localhost:7992/api/CohortDistributionDataService/
4649

4750
retrieve-cohort-request-audit:
4851
container_name: retrieve-cohort-request-audit
4952
image: cohort-manager-retrieve-cohort-request-audit
53+
platform: "linux/amd64"
5054
networks: [cohman-network]
5155
build:
5256
context: ./src/Functions/
5357
dockerfile: CohortDistributionServices/RetrieveCohortRequestAudit/Dockerfile
5458
profiles: [bs-select]
59+
ports:
60+
- "7086:7086"
5561
environment:
5662
- ASPNETCORE_URLS=http://*:7086
5763
- DtOsDatabaseConnectionString=Server=db,1433;Database=${DB_NAME};User Id=SA;Password=${PASSWORD};TrustServerCertificate=True
5864
- CohortDistributionDataServiceURL=http://cohort-distribution-data-service:7992/api/CohortDistributionDataService/
59-
- BsSelectRequestAuditDataService=http://bs-select-request-audit-data-service:7956/api/BsSelectRequestAuditDataService/
65+
- BsSelectRequestAuditDataService=http://bs-request-audit-data-service:7956/api/BsSelectRequestAuditDataService/
6066
- ExceptionFunctionURL=http://create-exception:7070/api/CreateException
6167

6268
transform-data-service:
6369
container_name: transform-data-service
6470
image: cohort-manager-transform-data-service
71+
platform: "linux/amd64"
6572
networks: [cohman-network]
6673
build:
6774
context: ./src/Functions/
@@ -79,6 +86,7 @@ services:
7986
remove-validation-exception-data:
8087
container_name: remove-validation-exception-data
8188
image: cohort-manager-remove-validation-exception-data
89+
platform: "linux/amd64"
8290
networks: [cohman-network]
8391
build:
8492
context: ./src/Functions/

application/CohortManager/compose.core.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
retrieve-mesh-file:
66
container_name: retrieve-mesh-file
77
image: cohort-manager-retrieve-mesh-file
8+
platform: "linux/amd64"
89
networks: [cohman-network]
910
build:
1011
context: ./src/Functions/
@@ -24,6 +25,7 @@ services:
2425
nems-mesh-retrieval:
2526
container_name: nems-mesh-retrieval
2627
image: cohort-manager-nems-mesh-retrieval
28+
platform: "linux/amd64"
2729
networks: [cohman-network]
2830
build:
2931
context: ./src/Functions/
@@ -46,6 +48,7 @@ services:
4648
process-nems-update:
4749
container_name: process-nems-update
4850
image: cohort-manager-process-nems-update
51+
platform: "linux/amd64"
4952
networks: [cohman-network]
5053
build:
5154
context: ./src/Functions/
@@ -66,10 +69,13 @@ services:
6669
receive-caas-file:
6770
container_name: receive-caas-file
6871
image: cohort-manager-receive-caas-file
72+
platform: "linux/amd64"
6973
networks: [cohman-network]
7074
build:
7175
context: ./src/Functions/
7276
dockerfile: CaasIntegration/receiveCaasFile/Dockerfile
77+
ports:
78+
- "7060:7060"
7379
environment:
7480
- AzureWebJobsStorage=${AZURITE_CONNECTION_STRING}
7581
- caasfolder_STORAGE=${AZURITE_CONNECTION_STRING}
@@ -93,6 +99,7 @@ services:
9399
manage-participant:
94100
container_name: manage-participant
95101
image: cohort-manager-manage-participant
102+
platform: "linux/amd64"
96103
networks: [cohman-network]
97104
build:
98105
context: ./src/Functions/
@@ -109,6 +116,7 @@ services:
109116
manage-servicenow-participant:
110117
container_name: manage-servicenow-participant
111118
image: cohort-manager-manage-servicenow-participant
119+
platform: "linux/amd64"
112120
networks: [cohman-network]
113121
build:
114122
context: ./src/Functions/
@@ -129,6 +137,7 @@ services:
129137
update-blocked-flag:
130138
container_name: update-blocked-flag
131139
image: cohort-manager-update-blocked-flag
140+
platform: "linux/amd64"
132141
networks: [cohman-network]
133142
build:
134143
context: ./src/Functions/
@@ -144,11 +153,12 @@ services:
144153
- ExceptionFunctionURL=http://create-exception:7070/api/CreateException
145154
- ManageNemsSubscriptionUnsubscribeURL=http://manage-nems-subscription:9081/api/Unsubscribe
146155
- ManageNemsSubscriptionSubscribeURL=http://manage-nems-subscription:9081/api/Subscribe
147-
- RetrievePdsDemographicURL=http://etrieve-pds-demographic:8082/api/RetrievePdsDemographic
156+
- RetrievePdsDemographicURL=http://retrieve-pds-demographic:8082/api/RetrievePdsDemographic
148157

149158
delete-participant:
150159
container_name: delete-participant
151160
image: cohort-manager-delete-participant
161+
platform: "linux/amd64"
152162
networks: [cohman-network]
153163
ports:
154164
- "7087:7087"
@@ -167,6 +177,7 @@ services:
167177
create-exception:
168178
container_name: create-exception
169179
image: cohort-manager-create-exception
180+
platform: "linux/amd64"
170181
networks: [cohman-network]
171182
build:
172183
context: ./src/Functions/
@@ -181,6 +192,7 @@ services:
181192
update-exception:
182193
container_name: update-exception
183194
image: cohort-manager-update-exception
195+
platform: "linux/amd64"
184196
networks: [cohman-network]
185197
build:
186198
context: ./src/Functions/
@@ -194,6 +206,7 @@ services:
194206
get-validation-exceptions:
195207
container_name: get-validation-exceptions
196208
image: cohort-manager-get-validation-exceptions
209+
platform: "linux/amd64"
197210
networks: [cohman-network]
198211
build:
199212
context: ./src/Functions/
@@ -211,6 +224,7 @@ services:
211224
static-validation:
212225
container_name: static-validation
213226
image: cohort-manager-static-validation
227+
platform: "linux/amd64"
214228
networks: [cohman-network]
215229
build:
216230
context: ./src/Functions/
@@ -223,6 +237,7 @@ services:
223237
lookup-validation:
224238
container_name: lookup-validation
225239
image: cohort-manager-lookup-validation
240+
platform: "linux/amd64"
226241
networks: [cohman-network]
227242
build:
228243
context: ./src/Functions/
@@ -242,6 +257,7 @@ services:
242257
retrieve-pds-demographic:
243258
container_name: retrieve-pds-demographic
244259
image: cohort-manager-retrieve-pds-demographic
260+
platform: "linux/amd64"
245261
networks: [cohman-network]
246262
build:
247263
context: ./src/Functions/
@@ -266,6 +282,7 @@ services:
266282
manage-nems-subscription:
267283
container_name: manage-nems-subscription
268284
image: cohort-manager-manage-nems-subscription
285+
platform: "linux/amd64"
269286
networks: [cohman-network]
270287
profiles: [nems]
271288
build:
@@ -295,6 +312,7 @@ services:
295312
durable-demographic-function:
296313
container_name: durable-demographic-function
297314
image: cohort-manager-durable-demographic-function
315+
platform: "linux/amd64"
298316
networks: [cohman-network]
299317
build:
300318
context: ./src/Functions/
@@ -312,6 +330,7 @@ services:
312330
servicenow-message-handler:
313331
container_name: servicenow-message-handler
314332
image: cohort-manager-servicenow-message-handler
333+
platform: "linux/amd64"
315334
networks: [cohman-network]
316335
build:
317336
context: ./src/Functions/
@@ -334,6 +353,7 @@ services:
334353
servicenow-cohort-lookup:
335354
container_name: servicenow-cohort-lookup
336355
image: cohort-manager-servicenow-cohort-lookup
356+
platform: "linux/amd64"
337357
networks: [cohman-network]
338358
build:
339359
context: ./src/Functions/
@@ -351,6 +371,7 @@ services:
351371
build:
352372
context: ./src/Web
353373
dockerfile: Dockerfile
374+
platform: "linux/amd64"
354375
restart: always
355376
profiles: [ui]
356377
ports:

0 commit comments

Comments
 (0)