Skip to content

Commit

Permalink
Update test dependencies to new EMQx broker version
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavia Pezoti authored and flapezoti committed May 7, 2021
1 parent e402e6b commit 16506f9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
Expand Down
4 changes: 2 additions & 2 deletions config/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ dogstatsd:
rate: 1
httpserver:
url: "http://localhost:8081"
user: user
pass: pass
user: admin
pass: public
4 changes: 2 additions & 2 deletions config/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ dogstatsd:
rate: 1
httpserver:
url: "http://localhost:8081"
user: user
pass: pass
user: admin
pass: public
2 changes: 1 addition & 1 deletion httpclient/httpclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 6 additions & 7 deletions test_containers/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 16506f9

Please sign in to comment.