diff --git a/Makefile b/Makefile index 9edaa9d..2c9b84d 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ run: run-containers: @cd test_containers && docker-compose up -d && cd .. - @/bin/bash -c "until curl -s localhost:8080 > /dev/null; do echo 'Waiting for EMQTT...' && sleep 1; done" + @/bin/bash -c "until curl -s localhost:8081 > /dev/null; do echo 'Waiting for EMQTT...' && sleep 1; done" kill-containers: @cd test_containers && docker-compose stop && cd .. diff --git a/config/local.yml b/config/local.yml index e756b9e..e6e785e 100644 --- a/config/local.yml +++ b/config/local.yml @@ -21,5 +21,5 @@ dogstatsd: rate: 1 httpserver: url: "http://localhost:8081" - user: user - pass: pass + user: admin + pass: public diff --git a/config/test.yml b/config/test.yml index 1183c57..06ad7d9 100644 --- a/config/test.yml +++ b/config/test.yml @@ -15,5 +15,5 @@ dogstatsd: rate: 1 httpserver: url: "http://localhost:8081" - user: user - pass: pass + user: admin + pass: public diff --git a/httpclient/httpclient.go b/httpclient/httpclient.go index fa706bf..0545b40 100644 --- a/httpclient/httpclient.go +++ b/httpclient/httpclient.go @@ -156,7 +156,7 @@ func (mc *HttpClient) configure(l log.FieldLogger) { } func (mc *HttpClient) setConfigurationDefaults() { - mc.Config.SetDefault("httpserver.url", "http://localhost:8080") + mc.Config.SetDefault("httpserver.url", "http://localhost:8081") mc.Config.SetDefault("httpserver.user", "admin") mc.Config.SetDefault("httpserver.pass", "public") mc.Config.SetDefault("httpserver.timeout", 500) diff --git a/test_containers/docker-compose.yml b/test_containers/docker-compose.yml index 0f87a62..5916f6a 100644 --- a/test_containers/docker-compose.yml +++ b/test_containers/docker-compose.yml @@ -1,20 +1,19 @@ version: '3.5' services: emqtt: - image: tfgco/emq-docker:v2.3-tfg-beta10 + image: emqx/emqx:4.2.9 environment: - - "EMQ_NAME=emq" - - "EMQ_NODE__COOKIE=ef16498f66804df1cc6172f6996d5492" - - "EMQ_WAIT_TIME=60" - - "EMQ_LISTENER__API__MGMT=0.0.0.0:8080" + - "EMQX_NAME=emqx" + - "EMQX_NODE__COOKIE=ef16498f66804df1cc6172f6996d5492" + - "EMQX_WAIT_TIME=60" restart: always ports: - "1883:1883" - - "8080:8080" + - "8081:8081" - "18083:18083" healthcheck: - test: "nc -z 0.0.0.0 8080" + test: "nc -z 0.0.0.0 8081" interval: 30s timeout: 30s retries: 3