Skip to content

Commit

Permalink
streamlined integration test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuedding committed Mar 18, 2024
1 parent 751c713 commit 64405e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ jobs:
- uses: actions/checkout@v3
- name: "Build docker image"
run: docker build -t fbuedding/fiware-iot-agent-sdk-test -f ./test.Dockerfile .
- name: "Pull docker images"
run: |
docker pull fiware/iotagent-ul:latest
docker pull mongo:4.2
docker pull fiware/orion:latest
- name: "Run tests"
run: docker compose run iot-agent-sdk-test
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
- "27017:27017"
command: --bind_ip_all
orion:
image: fiware/orion
image: fiware/orion:latest
hostname: orion
depends_on:
- mongodb
Expand Down
3 changes: 3 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

i "github.com/fbuedding/fiware-iot-agent-sdk"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)

Expand All @@ -26,6 +27,8 @@ const (
)

func TestMain(m *testing.M) {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})

host := "localhost"
if os.Getenv("TEST_HOST") != "" {
host = os.Getenv("TEST_HOST")
Expand Down

0 comments on commit 64405e5

Please sign in to comment.