From dc1a23cc45a3f8f4e6fcec0382b45e3e34fa7022 Mon Sep 17 00:00:00 2001 From: vasudevganesanhmcts <100689363+vasudevganesanhmcts@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:00:56 +0000 Subject: [PATCH] CIV-15890 better logging and failure screenshot capture for e2e (#5098) * initial commit with github ci changes * failing a test * Update claimCreation.js * revert fail test changes * few memory bump up * modifying log to move it under when the application is shuttered * correcting camel case ingressHost --- .github/workflows/ci.yml | 19 ++++++++++--------- .../civil-citizen-ui/values.aat.template.yaml | 2 +- ...values.elasticsearch.preview.template.yaml | 2 +- .../values.preview.template.yaml | 3 +++ src/main/app.ts | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 288b75b64ff..901a623780e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,17 +32,18 @@ jobs: run: yarn install && yarn playwright install - name: Build run: yarn build - - name: Starting WireMock - run: yarn wiremock:start & - - name: Starting CUI - run: yarn start:e2e & - - name: Waiting CUI to get ready - run: sleep 10 - - name: Executing e2e tests - run: yarn test:e2e + - name: Starting WireMock , starting ui , wait and run e2e test + run: | + yarn wiremock:start & + sleep 2 + yarn start:e2e & + sleep 25 + yarn test:e2e - name: Upload e2e test artifacts uses: actions/upload-artifact@v4 if: always() with: name: integration-tests-results - path: test-results/functional + path: | + test-results/functional + src/test/functionalTests/test-results diff --git a/charts/civil-citizen-ui/values.aat.template.yaml b/charts/civil-citizen-ui/values.aat.template.yaml index a2b37ad8618..17b8a5f0826 100644 --- a/charts/civil-citizen-ui/values.aat.template.yaml +++ b/charts/civil-citizen-ui/values.aat.template.yaml @@ -177,7 +177,7 @@ aac-manage-case-assignment: imagePullPolicy: Always releaseNameOverride: ${SERVICE_NAME}-aac-manage-case-assignment image: hmctspublic.azurecr.io/aac/manage-case-assignment:latest - ingresshost: civil-cui-manage-case-assignment-staging.aat.platform.hmcts.net + ingressHost: civil-cui-manage-case-assignment-staging.aat.platform.hmcts.net environment: IDAM_API_URL: https://idam-api.aat.platform.hmcts.net IDAM_OIDC_URL: https://idam-web-public.aat.platform.hmcts.net diff --git a/charts/civil-citizen-ui/values.elasticsearch.preview.template.yaml b/charts/civil-citizen-ui/values.elasticsearch.preview.template.yaml index 221843a194c..b43995a915c 100644 --- a/charts/civil-citizen-ui/values.elasticsearch.preview.template.yaml +++ b/charts/civil-citizen-ui/values.elasticsearch.preview.template.yaml @@ -79,7 +79,7 @@ civil-service: image: 'hmctspublic.azurecr.io/civil/service:latest' imagePullPolicy: Always ingressHost: ${SERVICE_NAME}-civil-service.preview.platform.hmcts.net - devcpuRequests: 500m + devcpuRequests: 1000m devmemoryRequests: 2048Mi devmemoryLimits: 4096Mi keyVaults: diff --git a/charts/civil-citizen-ui/values.preview.template.yaml b/charts/civil-citizen-ui/values.preview.template.yaml index 2936fa94693..3c17af882b2 100644 --- a/charts/civil-citizen-ui/values.preview.template.yaml +++ b/charts/civil-citizen-ui/values.preview.template.yaml @@ -217,6 +217,9 @@ civil-general-applications: releaseNameOverride: ${SERVICE_NAME}-general-applications ingressHost: ${SERVICE_NAME}-general-applications.preview.platform.hmcts.net imagePullPolicy: Always + devcpuRequests: 1000m + devmemoryRequests: 2048Mi + devmemoryLimits: 4096Mi keyVaults: civil: resourceGroup: civil diff --git a/src/main/app.ts b/src/main/app.ts index 1b0c6f495fa..ea5b6209cee 100644 --- a/src/main/app.ts +++ b/src/main/app.ts @@ -186,8 +186,8 @@ app.use((_req, res, next) => { const checkServiceAvailability = async (_req: express.Request, res: express.Response, next: express.NextFunction) => { const serviceShuttered = await isServiceShuttered(); - logger.info(`Checking for service availability... ${serviceShuttered}`); if (serviceShuttered) { + logger.info(`service is shuttered... ${serviceShuttered}`); res.render('service-unavailable'); } else { next();