diff --git a/nucleus/util/path/path_traversal_test.go b/nucleus/util/path/path_traversal_test.go index 2193eb4e494a1204d9c5c964efcb8498314eaf2f..3b2ea9fe0c82f7c7c8bf0470c581cdd55f40760e 100644 --- a/nucleus/util/path/path_traversal_test.go +++ b/nucleus/util/path/path_traversal_test.go @@ -7,6 +7,7 @@ import ( log "github.com/sirupsen/logrus" "os" "reflect" + "sort" "testing" ) @@ -99,6 +100,18 @@ func TestParseSchema(t *testing.T) { t.Errorf("ParseSchema() error = %v, wantErr %v", err, tt.wantErr) return } + sort.Slice(tt.want["Test_Container1"].Children, func(i, j int) bool { + return i < j + }) + sort.Slice(tt.want["Test_Container2"].Children, func(i, j int) bool { + return i < j + }) + sort.Slice(got["Test_Container1"].Children, func(i, j int) bool { + return i < j + }) + sort.Slice(got["Test_Container2"].Children, func(i, j int) bool { + return i < j + }) if !reflect.DeepEqual(got, tt.want) { t.Errorf("ParseSchema() got = %v, want %v", got, tt.want) }