This repository was archived by the owner on Mar 27, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 20
Functional tests #276
Merged
Merged
Functional tests #276
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
4d01277
Fix wrong type format
f8ceafd
Add .devcontainer to gitignore
2a29eee
Adjust import of mqtt
071c91b
Add SendInfo function with configurable arguments
8c7b995
Add first functional test about docker ps command
99d1df3
Update date in copyright
381a762
Add MqttSendAndReceiveTimeout test helper
8fca4f5
Update mod
a336037
Refactor test TestDockerPsApi
a4dfd77
Add check for bash command "docker ps -a"
4faa990
Add Close funtion for mqtt client test
65c3249
Add doc about functional tests
9787b05
Add first draft of pipeline with docker image
80da49f
Add step to run tests
e917de8
Add a trap to func tests script to kill mqtt broker
28c7c2e
Give MQTT broker some time to answer test request
229967d
Mark MqttSendAndReceiveTimeout as test helper function
1277820
Try to remove sleep before starting func tests
f5f722d
Fix docker arguments in func test
ef60ad0
Add check on return error of func SendInfo
c82aafb
Refactor ContainersPsEvent using pertinence topic
7c6dfc9
Refactor using topicPertinence info when subscribe
1cd2ab7
Change TestDockerPsApi checking real docker ps -a and mqtt msg
70f3128
Trim JSON reponse from MQTT broker to check returned data
6f09c15
Add assert to check every id of container in machine
43f8203
Improve docs fixing english
ea9a3b0
Redirect to null the output of mosquitto running script for tests
0169027
Rename for readability
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: tests | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| CI: | ||
| name: tests | ||
| runs-on: ubuntu-latest | ||
| container: guerra1994/go-mqtt-docker-env | ||
|
|
||
| steps: | ||
| - name: check out code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: download mod | ||
| run: go mod download | ||
|
|
||
| - name: run functional tests | ||
| run: ./scripts/functional-tests.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,4 +58,7 @@ arduino-connector-arm | |
| .idea | ||
| setup_host_test_env.sh | ||
|
|
||
| # End | ||
| ### Remote vscode container | ||
| .devcontainer/* | ||
|
|
||
| # End | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| trap 'kill "$(pidof mosquitto)"' EXIT | ||
|
|
||
| mosquitto > /dev/null & | ||
| go test -v --run="TestDockerPsApi" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.