diff --git a/nucleus/southbound_test.go b/nucleus/southbound_test.go index 8063b8120a583ea1e547146225a0f7f431319f1d..ccd0d298a5aacbdc857db743cbf1ddb8f624ee9a 100644 --- a/nucleus/southbound_test.go +++ b/nucleus/southbound_test.go @@ -114,7 +114,8 @@ func TestOpenConfig_Schema(t *testing.T) { schema: tt.fields.schema, 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) } }) diff --git a/nucleus/store_test.go b/nucleus/store_test.go index 8a393efd6b93204de7a993affc5ca1bd0b3ca42a..8a5f505093a312daf59602c0854a52917cd225c3 100644 --- a/nucleus/store_test.go +++ b/nucleus/store_test.go @@ -5,6 +5,7 @@ import ( "github.com/google/uuid" log "github.com/sirupsen/logrus" "reflect" + "sort" "testing" ) @@ -221,7 +222,14 @@ func Test_store_UUIDs(t *testing.T) { } for _, tt := range tests { 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) } })