The purpose of this PR is to add a structure for running locally functional tests about API.
For this, we are using a docker image while developing in order to have a reproducible environment also for CI on GitHub, the link for image https://hub.docker.com/r/guerra1994/go-mqtt-docker-env.
The documentation is updated also about running tests in local machines.
I just added a test for docker ps -a API and it checks the output of the command executed on bash and the message from broker MQTT. It allows us to avoid to follow a sequential order running tests but is consistent with what container are in the machine because it checks that 2 output figure out the same container id.
In order to automate steps explained in README.md there is a script that starts mosquitto, exec tests and kills it, to restore a correct state of the docker container.
The purpose of this PR is to add a structure for running locally functional tests about API. For this, we are using a docker image while developing in order to have a reproducible environment also for CI on GitHub, the link for image https://hub.docker.com/r/guerra1994/go-mqtt-docker-env. The documentation is updated also about running tests in local machines. I just added a test for
docker ps -a
API and it checks the output of the command executed on bash and the message from broker MQTT. It allows us to avoid to follow a sequential order running tests but is consistent with what container are in the machine because it checks that 2 output figure out the same container id. In order to automate steps explained in README.md there is a script that startsmosquitto
, exec tests and kills it, to restore a correct state of the docker container.