Skip to content
Snippets Groups Projects
Commit e7df554d authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

gracefully end Subscribe()-Test

parent 74fa95fc
Branches
Tags
2 merge requests!112Integration test,!90Develop
Pipeline #66540 passed with warnings
...@@ -114,7 +114,8 @@ func TestOpenConfig_Schema(t *testing.T) { ...@@ -114,7 +114,8 @@ func TestOpenConfig_Schema(t *testing.T) {
schema: tt.fields.schema, schema: tt.fields.schema,
id: tt.fields.id, id: tt.fields.id,
} }
if got := oc.Schema(); !reflect.DeepEqual(got, tt.want) { got := oc.Schema().SchemaTree
if !reflect.DeepEqual(got, tt.want.SchemaTree) {
t.Errorf("Schema() = %v, want %v", got, tt.want) t.Errorf("Schema() = %v, want %v", got, tt.want)
} }
}) })
......
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"reflect" "reflect"
"sort"
"testing" "testing"
) )
...@@ -221,7 +222,14 @@ func Test_store_UUIDs(t *testing.T) { ...@@ -221,7 +222,14 @@ func Test_store_UUIDs(t *testing.T) {
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
if got := tt.s.UUIDs(); !reflect.DeepEqual(got, tt.want) { sort.Slice(tt.want, func(i, j int) bool {
return tt.want[i].String() < tt.want[j].String()
})
got := tt.s.UUIDs()
sort.Slice(got, func(i, j int) bool {
return got[i].String() < got[j].String()
})
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("UUIDs() = %v, want %v", got, tt.want) t.Errorf("UUIDs() = %v, want %v", got, tt.want)
} }
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment