From f563198206b80c8079d39c7a915e76197d280202 Mon Sep 17 00:00:00 2001
From: Manuel Kieweg <manuel.kieweg@h-da.de>
Date: Fri, 26 Mar 2021 16:58:09 +0000
Subject: [PATCH] sort slices

---
 nucleus/util/path/path_traversal_test.go | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/nucleus/util/path/path_traversal_test.go b/nucleus/util/path/path_traversal_test.go
index 2193eb4e4..3b2ea9fe0 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)
 			}
-- 
GitLab