Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions application/CohortManager/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CAASFOLDER_STORAGE_CONNECTION_STRING="" # Enter the connection string for azurit
CONTAINER_NAME="" # Name of the container to be used in the test. Example: "inbound".
E2E_TEST_FILES_PATH="" # Path to the end-to-end test files directory. Example: "e2e/testFiles".
API_TEST_FILES_PATH="" # Path to the api test files directory. Example: "api/testFiles".
WIREMOCK_URL=http://localhost:8080/__admin/requests

# Data Service Endpoints to access the APIs built on top of the Entity Framework
# For Local Development & testing, make sure these are mapped using ports option in compose.data-services.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"request": {
"urlPath": "/oauth_token.do",
"method": "POST",
"formParameters": {
"grant_type": {
"equalTo": "refresh_token"
},
"client_id": {
"equalTo": "MockClientId-123"
},
"client_secret": {
"equalTo": "MockClientSecret-123"
},
"refresh_token": {
"equalTo": "MockRefreshToken-123"
}
}
},
"response": {
"jsonBody": {
"access_token": "MockAccessToken-123",
"refresh_token": "MockRefreshToken-123",
"scope": "IntegrationStationAll",
"token_type": "Bearer",
"expires_in": 1800
},
"status": 200
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"request": {
"urlPathPattern": "^/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseResolution/.+$",
"method": "PUT",
"headers": {
"Authorization": {
"equalTo": "Bearer MockAccessToken-123"
}
},
"bodyPatterns": [
{
"matchesJsonPath": "$[?(@.state == 6)]"
},
{
"matchesJsonPath": "$[?(@.resolution_code == '28')]"
},
{
"matchesJsonPath": "$.close_notes"
}
]
},
"response": {
"status": 200
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"request": {
"urlPathPattern": "^/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseUpdate/.+$",
"method": "PUT",
"headers": {
"Authorization": {
"equalTo": "Bearer MockAccessToken-123"
}
},
"bodyPatterns": [
{
"matchesJsonPath": "$[?(@.state == 10)]"
},
{
"matchesJsonPath": "$.work_notes"
}
]
},
"response": {
"status": 200
}
}
12 changes: 6 additions & 6 deletions application/CohortManager/compose.core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ services:
profiles: [service-now]
environment:
- ASPNETCORE_URLS=http://*:9092
- ServiceNowRefreshAccessTokenUrl=https://nhsdigitaldev.service-now.com/oauth_token.do
- ServiceNowUpdateUrl=https://nhsdigitaldev.service-now.com/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseUpdate
- ServiceNowResolutionUrl=https://nhsdigitaldev.service-now.com/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseResolution
- ServiceNowRefreshAccessTokenUrl=http://wiremock:8080/oauth_token.do
- ServiceNowUpdateUrl=http://wiremock:8080/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseUpdate
- ServiceNowResolutionUrl=http://wiremock:8080/api/x_nhsd_intstation/nhs_integration/9c78f87c97912e10dd80f2df9153aff5/CohortCaseResolution
- ServiceNowGrantType=refresh_token
- ServiceNowClientId=${SERVICENOW_CLIENT_ID}
- ServiceNowClientSecret=${SERVICENOW_CLIENT_SECRET}
- ServiceNowRefreshToken=${SERVICENOW_REFRESH_TOKEN}
- ServiceNowClientId=MockClientId-123
- ServiceNowClientSecret=MockClientSecret-123
- ServiceNowRefreshToken=MockRefreshToken-123
- ServiceNowParticipantManagementTopic=servicenow-participant-management-topic
- ServiceBusConnectionString_client_internal=Endpoint=sb://service-bus;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;
ports:
Expand Down
10 changes: 10 additions & 0 deletions application/CohortManager/compose.deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ services:
- SYS_PTRACE
restart: "no"

wiremock:
container_name: wiremock
networks: [cohman-network]
image: wiremock/wiremock
ports:
- "8080:8080"
volumes:
- ./Set-up/wiremock/mappings:/home/wiremock/mappings
command: --verbose --root-dir /home/wiremock

networks:
cohman-network:
name: cohman-network
Expand Down
Loading
Loading