From 57815cd67ddb05fa6cb3d537b6491d23ac2db89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Wed, 15 Jan 2025 15:02:48 +0100 Subject: [PATCH] FIX test --- .github/workflows/example.yml | 15 ++++----------- .github/workflows/example2.yml | 7 ------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index dca440fbfc..40e3fe2304 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -1,6 +1,6 @@ name: MQTT Broker Example -#on: [push] +on: [push] jobs: mqtt: @@ -11,13 +11,8 @@ jobs: image: eclipse-mosquitto:latest ports: - 1883:1883 - options: >- - --name mosquitto - env: - MOSQUITTO_USERNAME: user1 - MOSQUITTO_PASSWORD: pass1 - #volumes: - # - ./mosquitto.conf:/mosquitto/config/mosquitto.conf:ro + volumes: + - ${{ github.workspace}}/test/functionalTest/mosquittoConf:/mosquitto/config steps: - name: Checkout repository @@ -30,10 +25,8 @@ jobs: run: mosquitto_pub -h localhost -p 1883 -t "test/topic" -m "Hello from anonymous" - name: Publish with user1 - run: mosquitto_pub -h localhost -p 1883 -u user1 -P pass1 -t "test/topic" -m "Hello from user1" + run: mosquitto_pub -h localhost -p 1883 -u user1 -P xxxx -t "test/topic" -m "Hello from user1" - - name: Verify messages - run: mosquitto_sub -h localhost -p 1883 -t "test/topic" -C 2 # Create a mosquitto.conf file in the same directory with the following content: # listener 1883 diff --git a/.github/workflows/example2.yml b/.github/workflows/example2.yml index 8cc959010a..784c3ef936 100644 --- a/.github/workflows/example2.yml +++ b/.github/workflows/example2.yml @@ -10,14 +10,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - #- name: Set up Docker - # uses: docker/setup-buildx-action@v1 - - name: Run Mosquitto container - #run: docker run -d --name mosquitto -p 1883:1883 -v ${{ github.workspace }}/test/functionalTest/mosquitto_for_tests.conf:/mosquitto/config/mosquitto.conf -v ${{ github.workspace }}/test/functionalTest/mosquitto_passwd:/mosquitto/config/mosquitto_passwd eclipse-mosquitto - #run: docker run -d --name mosquitto -p 1883:1883 -v ${{ github.workspace }}/mosquitto.conf:/mosquitto/config/mosquitto.conf eclipse-mosquitto - #run: docker run -d --name mosquitto -p 1883:1883 eclipse-mosquitto - #run: docker run -d --name mosquitto -p 1883:1883 -v $(pwd)/test/functionalTest/mosquittoConf:/mosquitto/config --user 0:0 eclipse-mosquitto <-- this works run: docker run -d --name mosquitto -p 1883:1883 -v $(pwd)/test/functionalTest/mosquittoConf:/mosquitto/config eclipse-mosquitto - name: Publish messages