-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HEAT-106: Standardise endpoints #231
Conversation
Managed to get this the integration tests to pass with the following changes to two files (it wouldn't let me comment directly on the PR changes as they weren't bits you've touched.... 🙄 ) Looks like you've changed the json format for /health; so just updating for that. Although it now passes, probably worth checking that what's returned at http://localhost:3007/health is what you're intending! diff --git a/integration_tests/e2e/health.cy.ts b/integration_tests/e2e/health.cy.ts
index afa496b..e0d54e5 100644
--- a/integration_tests/e2e/health.cy.ts
+++ b/integration_tests/e2e/health.cy.ts
@@ -26,8 +26,8 @@ context('Healthcheck', () => {
cy.task('stubTokenVerificationPing', 500)
cy.request({ url: '/health', method: 'GET', failOnStatusCode: false }).then(response => {
- expect(response.body.checks.hmppsAuth).to.equal('OK')
- expect(response.body.checks.tokenVerification).to.contain({ status: 500, retries: 2 })
+ expect(response.body.components.hmppsAuth.status).to.equal('UP')
+ expect(response.body.components.tokenVerification.status).to.contain({ status: 500, retries: 2 })
})
})
})
diff --git a/integration_tests/mockApis/tokenVerification.ts b/integration_tests/mockApis/tokenVerification.ts
index 1b9d47a..17be392 100644
--- a/integration_tests/mockApis/tokenVerification.ts
+++ b/integration_tests/mockApis/tokenVerification.ts
@@ -11,7 +11,7 @@ export default {
response: {
status,
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
- jsonBody: { status: 'UP' },
+ jsonBody: { status: 'DOWN' },
},
}),
stubVerifyToken: (active = true): SuperAgentRequest => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Attempt to bring health and info endpoints inline with the Kotlin template.