Skip to content
Snippets Groups Projects
Commit 3545d28e authored by Fabian Seidl's avatar Fabian Seidl
Browse files

remove test for path in subscribe events because order is not deterministic

parent 71f797e0
Branches
No related tags found
1 merge request!691Resolve "Implement integration tests for applications"
...@@ -4,7 +4,6 @@ import ( ...@@ -4,7 +4,6 @@ import (
"context" "context"
"fmt" "fmt"
"os" "os"
"reflect"
"testing" "testing"
"code.fbi.h-da.de/danet/gosdn/api/go/gosdn/conflict" "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/conflict"
...@@ -105,9 +104,6 @@ func TestMain(m *testing.M) { ...@@ -105,9 +104,6 @@ func TestMain(m *testing.M) {
func TestNetworkElementAddAndSubscribeEvent(t *testing.T) { func TestNetworkElementAddAndSubscribeEvent(t *testing.T) {
// setup required parameters // setup required parameters
const hostnamePath = "/system/config/hostname"
const domainNamePath = "/system/config/domain-name"
opt := &tpb.TransportOption{ opt := &tpb.TransportOption{
Address: targetAAdress, Address: targetAAdress,
Username: targetUserAndPW, Username: targetUserAndPW,
...@@ -150,11 +146,9 @@ func TestNetworkElementAddAndSubscribeEvent(t *testing.T) { ...@@ -150,11 +146,9 @@ func TestNetworkElementAddAndSubscribeEvent(t *testing.T) {
subscribeEvent := <-application.eventChannel subscribeEvent := <-application.eventChannel
assert.Equal(t, event.Subscribe.String(), subscribeEvent.Type) 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 subscribeEvent = <-application.eventChannel
assert.Equal(t, event.Subscribe.String(), subscribeEvent.Type) 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) { func TestUserAddAndUpdateEvent(t *testing.T) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment