From 783441ee7c7b2089ceb772f0c7493f7576356d18 Mon Sep 17 00:00:00 2001 From: sclausen Date: Mon, 8 Oct 2018 20:46:22 +0200 Subject: [PATCH] First try running mosquitto inside travis for stable testing. --- .travis.yml | 4 ++++ mosquitto.conf | 6 ++++++ tests/mqtt.service.spec.ts | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 mosquitto.conf diff --git a/.travis.yml b/.travis.yml index e2d82f1..8cb6e12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,12 @@ script: branches: only: - master +services: + - docker before_install: - export CHROME_BIN=chromium-browser + - docker pull eclipse-mosquitto + - docker run -d -p 9001:9001 -v $(pwd)/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro eclipse-mosquitto before_script: - export DISPLAY=:99.0 diff --git a/mosquitto.conf b/mosquitto.conf new file mode 100644 index 0000000..5a60f49 --- /dev/null +++ b/mosquitto.conf @@ -0,0 +1,6 @@ +listener 9001 +protocol websockets + +persistence true +persistence_location /mosquitto/data/ +log_dest file /mosquitto/log/mosquitto.log \ No newline at end of file diff --git a/tests/mqtt.service.spec.ts b/tests/mqtt.service.spec.ts index d52e479..8cb0eb3 100644 --- a/tests/mqtt.service.spec.ts +++ b/tests/mqtt.service.spec.ts @@ -17,8 +17,8 @@ import { const config: IMqttServiceOptions = { connectOnCreate: true, - hostname: 'test.mosquitto.org', - port: 8080, + hostname: 'localhost', + port: 9001, path: '' };