Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions azure/azure-release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,23 @@ extends:
post_deploy:
- template: templates/e2e.yml
parameters:
app_id: "84aa2219-7170-4279-93fb-3d37b89bbc01"
test_type: smoketest
depends_on:
- internal_qa
- environment: sandbox
post_deploy:
- template: templates/e2e.yml
parameters:
app_id: "a50e2f01-ea28-41c9-8666-850c034ddd82"
test_type: smoketest
depends_on:
- internal_qa
- environment: prod
post_deploy:
- template: templates/e2e.yml
parameters:
app_id: "72ada63b-9d70-4ca2-b9f2-cd1ce74c2dde"
test_type: smoketest
depends_on:
- int
Expand Down
7 changes: 5 additions & 2 deletions azure/templates/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
parameters:
- name: test_type
- name: app_id
type: string
default: ""

steps:

Expand All @@ -19,12 +22,12 @@ steps:
displayName: poetry install

- bash: |
export RELEASE_RELEASEID=$(Build.BuildId)
export SOURCE_COMMIT_ID=$(Build.SourceVersion)
export PROXY_NAME="$(FULLY_QUALIFIED_SERVICE_NAME)"
export APIGEE_ACCESS_TOKEN="$(secret.AccessToken)"
export APIGEE_ENVIRONMENT="$(APIGEE_ENVIRONMENT)"
export APIGEE_ORGANIZATION="nhsd-$(APIGEE_ORGANIZATION)"
export APIGEE_APP_ID=${{ parameters.app_id }}
export STATUS_ENDPOINT_API_KEY="$(STATUS_ENDPOINT_API_KEY)"
make -C e2e ${{ parameters.test_type }}

workingDirectory: $(SERVICE_DIR)
Expand Down
6 changes: 4 additions & 2 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ TEST_CMD := pytest \
--api-name=sync-wrap \
--proxy-name=$(PROXY_NAME) \

ifdef APIGEE_ORGANIZATION
TEST_CMD += --apigee-organization=$(APIGEE_ORGANIZATION)
ifeq ($(APIGEE_ORGANIZATION), nhsd-prod)
TEST_CMD += --apigee-organization=$(APIGEE_ORGANIZATION) \
--apigee-app-id=$(APIGEE_APP_ID) \
--status-endpoint-api-key=$(STATUS_ENDPOINT_API_KEY)
endif

test:
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _container_not_ready(resp: requests.Response):

deployed_commit_id = resp.json().get("commitId")

while deployed_commit_id != getenv("SOURCE_COMMIT_ID") or _container_not_ready(resp) and retries <= 45:
while deployed_commit_id != getenv("SOURCE_COMMIT_ID") or _container_not_ready(resp) and retries <= 50:
resp = requests.get(
f"{nhsd_apim_proxy_url}/_status", headers=status_endpoint_auth_headers, timeout=30
)
Expand Down