This repository contains the "system tests" of Eclipse Ditto.
They ensure that on API level no regressions happen, that APIs stay stable and that added functionality is tested
from a user perspective.
System tests require the following components to run.
- Containers required by Ditto stack (MongoDB) and by connectivity tests (Mosquitto, Artemis etc.).
- A working Ditto stack, either as docker stack or launched from IntelliJ.
- A local authorization server mock.
If you want to launch Ditto from IntelliJ, start the MongoDB container:
cd docker
docker-compose up -d mongodb
If you want to run Ditto as a docker stack, simply run docker/start.sh
. MongoDB is included.
Connectivity tests require message brokers. Start them thus:
cd docker
# AMQP broker
docker-compose up -d artemis
# MQTT broker
docker-compose up -d mqtt
# Kafka broker
docker-compose up -d kafka
# RabbitMQ broker
docker-compose up -d rabbitmq
The brokers do consume system resources. Start them on a by-need basis.
To run Ditto as a docker stack, simply execute docker/start.sh
. MongoDB is included.
To launch Ditto from IntelliJ, in debug mode for instance, run
Policies
first and the other required
services after. A launch sequence could look like this:
Or, simply make use of the multirun plugin for which a run configuration also is available.
Tests authenticate themselves via OAuth against a mock server.
The tests make use of the mock-oauth2-server.
In order to run it, simply start it via compose:
cd docker
# OAuth mock server
docker-compose up -d oauth
``