The public frontend for the Manage your Advance Tariff Rulings service, used to apply for Advance Tariff Rulings (ATaRs).
- Service Manager 2 installed
- SBT Version
>=1.x
installed - MongoDB version
>=3.6
installed and running on port 27017 - Localstack installed and running on port 4572
- Create an S3 bucket in localstack by using
awslocal s3 mb s3://digital-tariffs-local
within the localstack container
The easiest way to run MongoDB and Localstack for local development is to use Docker.
> docker run --restart unless-stopped -d -p 27017-27019:27017-27019 --name mongodb mongo:3.6.13
> docker run -d --restart unless-stopped --name localstack -e SERVICES=s3 -p4572:4566 -p8080:8080 localstack/localstack
> docker exec -it localstack bash
> awslocal s3 mb s3://digital-tariffs-local
> exit
- Launch dependencies using
sm2 --start DIGITAL_TARIFFS_DEPS
- Start the backend service binding-tariff-classification using
sm2 --start BINDING_TARIFF_CLASSIFICATION
- Start the filestore service binding-tariff-filestore using
sm2 --start BINDING_TARIFF_FILESTORE
Use sbt run
to boot the app or run it with Service Manager 2 using sm2 --start BINDING_TARIFF_TRADER_FRONTEND
.
This application runs on port 9582.
Open http://localhost:9582/advance-tariff-application
.
You can also run the DIGITAL_TARIFFS
profile using sm2 --start DIGITAL_TARIFFS
and then stop the Service Manager 2 instance of this service using sm2 --stop BINDING_TARIFF_TRADER_FRONTEND
before running with sbt.
The service uses the HMRC auth-client for authentication with Government Gateway as the authentication provider. In non production environments you will be redirected to the auth-login-stub. You can log in using the following enrolment information:
Enrolment Key: HMRC-ATAR-ORG
Identifier Name: EORINumber
Identifier Value: <any string>
When running the unit tests, PDFs are generated at /test/resources/fop using Apache FOP. These should be used to check for regressions in the layout of the PDFs generated by the service.
Run ./run_all_tests.sh
. This also runs scalafmt and does coverage testing. The last step will also run the a11y test that generates a report.
Have node installed on your machine
To run the tests locally, simply run:
sbt clean A11y/test
This code is open source software licensed under the Apache 2.0 License.