Skip to content

Commit

Permalink
fix(tests): fix docker compose (#814)
Browse files Browse the repository at this point in the history
* fix(tests): fix docker compose

* docker-compose v1 was removed from runner images

* refactor(tests): fix style of test
  • Loading branch information
GoetzGoerisch authored Aug 19, 2024
1 parent 18b6191 commit df331a5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
cd UmatiDashboardOpcUaClient/Tests/integration/cacert_test || exit
./genCerts.sh
cp "${{ github.workspace }}/build/Dashboard-Client-build/Tests/unit/TestCaCertificate" .
docker-compose up -d
docker compose up -d
./evaluateTest.sh
- name: Upload Artefacts
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ You can use the client for instance testing or for connecting to the umati.app D

Follow these instructions to use the client as a testing tool for your implementation: [Model Testing usage](doc/usage_as_model_test.md)

**Local requirements**
#### Local requirements

For the local instance testing you need to run your own MQTT Broker and a MQTT Client. See [MQTT Doc](doc/MQTT.md) for more information and instructions

[Here](example/ShowcaseDeployment/) is an docker-compose example including a mqtt broker, a umati Sample Server and the gateway. The example contains also the need configuration for the samples.
[Here](example/ShowcaseDeployment/) is an `docker compose` example including a mqtt broker, a umati Sample Server and the gateway. The example contains also the need configuration for the samples.

### Usage for connecting a server to the dashboard

Expand Down
1 change: 0 additions & 1 deletion Tests/integration/cacert_test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: '3.1'
services:
mqtt:
image: eclipse-mosquitto
Expand Down
8 changes: 4 additions & 4 deletions Tests/integration/cacert_test/evaluateTest.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
NEXT_WAITTIME=0
WAITTIME_LIMIT_SEC=120
while [[ "$(docker inspect cacert_test_test_1 --format='{{.State.Status}}')" != "exited" || "$NEXT_WAITTIME" == "$WAITTIME_LIMIT_SEC" ]]
while [[ "$(docker inspect cacert_test-test-1 --format='{{.State.Status}}')" != "exited" || "$NEXT_WAITTIME" == "$WAITTIME_LIMIT_SEC" ]]
do
echo "Waiting for test container to become ready since ${NEXT_WAITTIME}s..."
sleep 1
NEXT_WAITTIME=$(($NEXT_WAITTIME+1))
NEXT_WAITTIME=$((NEXT_WAITTIME+1))
done
docker-compose logs
exit "$(docker inspect cacert_test_test_1 --format='{{.State.ExitCode}}')"
docker compose logs
exit "$(docker inspect cacert_test-test-1 --format='{{.State.ExitCode}}')"

0 comments on commit df331a5

Please sign in to comment.