Skip to content

Commit

Permalink
updatet devices
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuedding committed Mar 18, 2024
1 parent 0b81988 commit b8d66b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Build docker image"
run: docker build -t fbuedding/fiware-iot-agent-sdk-test -f ./test.Dockerfile .
- name: "Run tests"
run: docker compose run iot-agent-sdk-test
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ services:
- TEST_HOST=iot-agent
- LOG_LEVEL=DEBUG
- TZ:"Europe/Berlin"
build:
dockerfile: test.Dockerfile
context: ./
image: fbuedding/fiware-iot-agent-sdk-test
ports:
- 8080:8080
depends_on:
Expand Down
7 changes: 4 additions & 3 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func TestMain(m *testing.M) {
ServicePath: servicePath,
Resource: resource,
Apikey: apiKey,
EntityType: "Test",
Autoprovision: false,
}
iota.DeleteDevice(fs, d.Id)
Expand All @@ -49,7 +50,7 @@ func TestMain(m *testing.M) {
iota.DeleteConfigGroup(fs, resource, apiKey)
err = iota.CreateConfigGroup(fs, sg)
if err != nil {
log.Fatal().Err(err).Msg("Could not create service group for tests")
log.Fatal().Err(err).Msg("Could not delete config group for tests")
}
m.Run()
teardown()
Expand All @@ -58,11 +59,11 @@ func TestMain(m *testing.M) {
func teardown() {
err := iota.DeleteDevice(fs, d.Id)
if err != nil {
log.Fatal().Err(err).Msg("Could not create device for teardown")
log.Fatal().Err(err).Msg("Could not delete device for teardown")
}

err = iota.DeleteConfigGroup(fs, resource, apiKey)
if err != nil {
log.Fatal().Err(err).Msg("Could not create device for teardown")
log.Fatal().Err(err).Msg("Could not delete device for teardown")
}
}

0 comments on commit b8d66b7

Please sign in to comment.