Skip to content

Commit db62c35

Browse files
Furistoroboquat
authored andcommitted
[installer] Fix test failure
1 parent 637f360 commit db62c35

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

install/installer/pkg/common/customize_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package common_test
55

66
import (
77
"reflect"
8+
"sort"
89
"testing"
910

1011
"github.com/gitpod-io/gitpod/installer/pkg/common"
@@ -520,6 +521,13 @@ func TestCustomizeEnvvar(t *testing.T) {
520521

521522
result := common.CustomizeEnvvar(ctx, testCase.Component, testCase.ExistingEnnvars)
522523

524+
sort.Slice(result, func(a, b int) bool {
525+
return result[a].Name < result[b].Name
526+
})
527+
sort.Slice(testCase.Expect, func(a, b int) bool {
528+
return result[a].Name < result[b].Name
529+
})
530+
523531
if !reflect.DeepEqual(testCase.Expect, result) {
524532
t.Errorf("expected %v but got %v", testCase.Expect, result)
525533
}

0 commit comments

Comments
 (0)