Skip to content

Commit 6ae4fdd

Browse files
Merge branch 'main' into feat/nems-replacement-mesh-branch
2 parents 4f8bd7f + ce77549 commit 6ae4fdd

22 files changed

Lines changed: 1216 additions & 17 deletions

File tree

application/CohortManager/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ CAASFOLDER_STORAGE_CONNECTION_STRING="" # Enter the connection string for azurit
1818
CONTAINER_NAME="" # Name of the container to be used in the test. Example: "inbound".
1919
E2E_TEST_FILES_PATH="" # Path to the end-to-end test files directory. Example: "e2e/testFiles".
2020
API_TEST_FILES_PATH="" # Path to the api test files directory. Example: "api/testFiles".
21+
WIREMOCK_URL=http://localhost:8080/__admin/requests
2122

2223
# Data Service Endpoints to access the APIs built on top of the Entity Framework
2324
# For Local Development & testing, make sure these are mapped using ports option in compose.data-services.yaml
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"request": {
3+
"urlPath": "/oauth_token.do",
4+
"method": "POST",
5+
"formParameters": {
6+
"grant_type": {
7+
"equalTo": "refresh_token"
8+
},
9+
"client_id": {
10+
"equalTo": "MockClientId-123"
11+
},
12+
"client_secret": {
13+
"equalTo": "MockClientSecret-123"
14+
},
15+
"refresh_token": {
16+
"equalTo": "MockRefreshToken-123"
17+
}
18+
}
19+
},
20+
"response": {
21+
"jsonBody": {
22+
"access_token": "MockAccessToken-123",
23+
"refresh_token": "MockRefreshToken-123",
24+
"scope": "IntegrationStationAll",
25+
"token_type": "Bearer",
26+
"expires_in": 1800
27+
},
28+
"status": 200
29+
}
30+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"request": {
3+
"urlPathPattern": "^/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseResolution/.+$",
4+
"method": "PUT",
5+
"headers": {
6+
"Authorization": {
7+
"equalTo": "Bearer MockAccessToken-123"
8+
}
9+
},
10+
"bodyPatterns": [
11+
{
12+
"matchesJsonPath": "$[?(@.state == 6)]"
13+
},
14+
{
15+
"matchesJsonPath": "$[?(@.resolution_code == '28')]"
16+
},
17+
{
18+
"matchesJsonPath": "$.close_notes"
19+
}
20+
]
21+
},
22+
"response": {
23+
"status": 200
24+
}
25+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"request": {
3+
"urlPathPattern": "^/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseUpdate/.+$",
4+
"method": "PUT",
5+
"headers": {
6+
"Authorization": {
7+
"equalTo": "Bearer MockAccessToken-123"
8+
}
9+
},
10+
"bodyPatterns": [
11+
{
12+
"matchesJsonPath": "$[?(@.state == 10)]"
13+
},
14+
{
15+
"matchesJsonPath": "$.work_notes"
16+
}
17+
]
18+
},
19+
"response": {
20+
"status": 200
21+
}
22+
}

application/CohortManager/compose.core.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,13 @@ services:
350350
profiles: [service-now]
351351
environment:
352352
- ASPNETCORE_URLS=http://*:9092
353-
- ServiceNowRefreshAccessTokenUrl=https://nhsdigitaldev.service-now.com/oauth_token.do
354-
- ServiceNowUpdateUrl=https://nhsdigitaldev.service-now.com/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseUpdate
355-
- ServiceNowResolutionUrl=https://nhsdigitaldev.service-now.com/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseResolution
353+
- ServiceNowRefreshAccessTokenUrl=http://wiremock:8080/oauth_token.do
354+
- ServiceNowUpdateUrl=http://wiremock:8080/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseUpdate
355+
- ServiceNowResolutionUrl=http://wiremock:8080/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseResolution
356356
- ServiceNowGrantType=refresh_token
357-
- ServiceNowClientId=${SERVICENOW_CLIENT_ID}
358-
- ServiceNowClientSecret=${SERVICENOW_CLIENT_SECRET}
359-
- ServiceNowRefreshToken=${SERVICENOW_REFRESH_TOKEN}
357+
- ServiceNowClientId=MockClientId-123
358+
- ServiceNowClientSecret=MockClientSecret-123
359+
- ServiceNowRefreshToken=MockRefreshToken-123
360360
- ServiceNowParticipantManagementTopic=servicenow-participant-management-topic
361361
- ServiceBusConnectionString_client_internal=Endpoint=sb://service-bus;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;
362362
ports:

application/CohortManager/compose.deps.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ services:
7272
- SYS_PTRACE
7373
restart: "no"
7474

75+
wiremock:
76+
container_name: wiremock
77+
networks: [cohman-network]
78+
image: wiremock/wiremock
79+
ports:
80+
- "8080:8080"
81+
volumes:
82+
- ./Set-up/wiremock/mappings:/home/wiremock/mappings
83+
command: --verbose --root-dir /home/wiremock
84+
7585
networks:
7686
cohman-network:
7787
name: cohman-network

0 commit comments

Comments
 (0)