Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Add config testing for device-snmp (#58)
Browse files Browse the repository at this point in the history
* Add config testing for device-snmp

* Add dev channel to ci workflow
  • Loading branch information
farshidtz authored Apr 26, 2022
1 parent 6edd8bb commit 3d4e6d1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/snap-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
channel: edge/pr-177

- name: device-snmp
channel: edge/pr-160

- name: device-modbus
channel: edge/pr-336
Expand Down
15 changes: 11 additions & 4 deletions test/suites/device-snmp/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ import (

// Deprecated
func TestEnvConfig(t *testing.T) {
t.Run("change service port", func(t *testing.T) {
utils.TestEnvChangeServicePort(t, deviceSnmpSnap, defaultServicePort)
})
utils.SetEnvConfig(t, deviceSnmpSnap, deviceSnmpService, defaultServicePort)
}

func TestAppConfig(t *testing.T) {
t.Skip("TODO")
utils.SetAppConfig(t, deviceSnmpSnap, deviceSnmpService, deviceSnmpApp, defaultServicePort)
}

func TestGlobalConfig(t *testing.T) {
// start clean
utils.SetGlobalConfig(t, deviceSnmpSnap, deviceSnmpService, defaultServicePort)
}

func TestMixedConfig(t *testing.T) {
utils.SetMixedConfig(t, deviceSnmpSnap, deviceSnmpService, deviceSnmpApp, defaultServicePort)
}
7 changes: 5 additions & 2 deletions test/suites/device-snmp/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import (
"time"
)

const deviceSnmpSnap = "edgex-device-snmp"
const deviceSnmpService = "edgex-device-snmp.device-snmp"
const (
deviceSnmpSnap = "edgex-device-snmp"
deviceSnmpApp = "device-snmp"
deviceSnmpService = deviceSnmpSnap + "." + deviceSnmpApp
)

var start = time.Now()

Expand Down

0 comments on commit 3d4e6d1

Please sign in to comment.