Skip to content

Commit

Permalink
FIX test
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed Jan 15, 2025
1 parent 007bcab commit 57815cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: MQTT Broker Example

#on: [push]
on: [push]

jobs:
mqtt:
Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/example2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57815cd

Please sign in to comment.