Skip to main content

Repository: govuk-synthetic-test-app

Test app to help GOV.UK developers familiarise themselves with Kubernetes release process

Ownership
#govuk-platform-engineering owns the repo. #govuk-platform-support receives automated alerts for this repo.
Category
Utilities

README

This is a simple synthetic test app used to test that the GOV.UK CI/CD pipeline is working.

Run the app locally

The app is intended to run on the GOV.UK Kubernetes clusters, but it is also possible to run it locally.

docker build -t govuk-synthetic-test-app .
docker run --rm -p3000:3000 govuk-synthetic-test-app

You should then be able to browse the web app on http://localhost:3000/.

Running Ginkgo tests

NOTE - at the moment the tests only work when deployed on to an EKS cluster as it is using the synthetic-test-assumer role.

The image tag in the manifest is the most recent build generated by a merge into main or a manual trigger of the build-runner workflow in github actions. You can set it to latest to always use the latest build or target a specific release from the list of packages available.

The following commands target integration, replace integration with staging / production to target those environments.

  • Before running the tests please ensure that the correct kubectl context is set, eg

kubectl config use-context govuk-integration

  • To get the tests running you will need to apply this manifest

gds aws govuk-integration-platformengineer -- kubectl apply -f ./govuk-synthetic-test-app.yaml -n apps

  • To see the results of the tests you can run this kubectl command

gds aws govuk-integration-platformengineer -- kubectl logs govuk-synthetic-test-app-runner -n apps

  • To delete the pod after the tests have completed run this kubectl command

gds aws govuk-integration-platformengineer -- kubectl delete -f ./govuk-synthetic-test-app.yaml -n apps