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
No related branches found
No related tags found
1 merge request!691Resolve "Implement integration tests for applications"
This commit is part of merge request !691. Comments created here will be created in the context of that merge request.
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment