This is the backend/middleware component of the Wizard application.
In order to build the application, you need Docker and Docker Compose. For development and testing, you also need Apache Maven 3 and JDK 1.8.
- Windows
- Mac
- Linux:
- Open
/etc/environment
in a text editor - For each variable, add a line of the form
export VARIABLE_NAME=value
- Run
source /etc/environment
in a terminal - The variables should now be set for that terminal session. They will be set globally whenever the system reboots.
- Open
First, copy the contents file .env.sample
into a file with the name .env
, modifying the values of the environment variables as necessary. Then run the commands docker network create wizard
and docker-compose -f docker-compose.dev.yml up --build -d
. A development container will become available at http://localhost:8080
, or whatever port you configured in .env
.
Before you can run the integration tests, you have to set some environment variables:
WIZARD_TEST_MONGODB_HOST: localhost
WIZARD_TEST_MONGODB_PORT: 27019
WIZARD_TEST_MONGODB_USERNAME: test_user
WIZARD_TEST_MONGODB_PASSWORD: test_password
WIZARD_TEST_MONGODB_DATABASE: wizard_test
WIZARD_TEST_TOMCAT_PROTOCOL: http
WIZARD_TEST_TOMCAT_HOST: localhost
WIZARD_TEST_TOMCAT_PORT: 8082
The port numbers can be changed, but the rest should not be changed.
In addition, you need to copy the contents of the file .analysis_test.env.sample
into a file with the name .analysis_test.env
.
The integration tests will only work if the application is already running. You can start it in a test container
with the command ./integration_test_setup.sh
, and stop it with the command ./integration_test_teardown.sh
.
You may need to add the prefix sudo -E
to these commands.
To run the unit tests and integration tests:
mvn verify
To run only the unit tests:
mvn test
To run only the integration tests:
mvn -Dskip.unit.tests=true verify
To run the style tests:
mvn checkstyle:check
We recommend using the infrastructure repository for deploying to production.
The API is described in API.md.
See CONTRIBUTING.md.
See LICENSE.