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
2 changes: 1 addition & 1 deletion e2e/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pytest-asyncio = "^0.14.0"
coverage = "^5.3"

[tool.poetry.dev-dependencies]
api-test-utils = {url = "https://github.com/NHSDigital/apim-test-utils/releases/download/v1.0.14-alpha/api_test_utils-1.0.14a0-py3-none-any.whl"}
api-test-utils = {url = "https://github.com/NHSDigital/apim-test-utils/releases/download/v1.0.41-alpha/api_test_utils-1.0.41a0-py3-none-any.whl"}

[build-system]
requires = ["poetry>=0.12"]
Expand Down
16 changes: 8 additions & 8 deletions e2e/tests/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ async def _is_complete(resp: ClientResponse):
@pytest.mark.asyncio
async def test_api_status_with_service_header_another_service(api_client: APISessionClient):

async with api_client.get("_status", headers={'x-apim-service': 'async-slowapp'}) as r:
assert r.status == 200, (r.status, r.reason, (await r.text())[:2000])
body = await r.json()
r = await api_client.get("_status", allow_retries=True, max_retries=5, headers={'x-apim-service': 'async-slowapp'})
assert r.status == 200, (r.status, r.reason, (await r.text())[:2000])
body = await r.json()

assert body.get('service') == 'sync-wrap'
assert body.get('service') == 'sync-wrap'


@pytest.mark.smoketest
@pytest.mark.asyncio
async def test_api_status_with_service_header(api_client: APISessionClient):

async with api_client.get("_status", headers={'x-apim-service': 'sync-wrap'}) as r:
assert r.status == 200, (r.status, r.reason, (await r.text())[:2000])
body = await r.json()
r = await api_client.get("_status", allow_retries=True, max_retries=5, headers={'x-apim-service': 'sync-wrap'})
assert r.status == 200, (r.status, r.reason, (await r.text())[:2000])
body = await r.json()

assert body.get('service') == 'sync-wrap'
assert body.get('service') == 'sync-wrap'


@pytest.mark.asyncio
Expand Down