Skip to content
Snippets Groups Projects

Resolve "Implement integration tests for applications"

Merged Fabian Seidl requested to merge 347-implement-integration-tests-for-applications into master
1 file
+ 0
6
Compare changes
  • Side-by-side
  • Inline
@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"os"
"reflect"
"testing"
"code.fbi.h-da.de/danet/gosdn/api/go/gosdn/conflict"
@@ -105,9 +104,6 @@ func TestMain(m *testing.M) {
func TestNetworkElementAddAndSubscribeEvent(t *testing.T) {
// setup required parameters
const hostnamePath = "/system/config/hostname"
const domainNamePath = "/system/config/domain-name"
opt := &tpb.TransportOption{
Address: targetAAdress,
Username: targetUserAndPW,
@@ -150,11 +146,9 @@ func TestNetworkElementAddAndSubscribeEvent(t *testing.T) {
subscribeEvent := <-application.eventChannel
assert.Equal(t, event.Subscribe.String(), subscribeEvent.Type)
assert.Equal(t, hostnamePath, reflect.ValueOf(subscribeEvent.PathsAndValuesMap).MapKeys()[0].String(), "Should be hostname path.")
subscribeEvent = <-application.eventChannel
assert.Equal(t, event.Subscribe.String(), subscribeEvent.Type)
assert.Equal(t, domainNamePath, reflect.ValueOf(subscribeEvent.PathsAndValuesMap).MapKeys()[0].String(), "Should be domain-name path.")
}
func TestUserAddAndUpdateEvent(t *testing.T) {
Loading