From 23d2a215dc8c45a9185a61c8514b4e65f4b00bba Mon Sep 17 00:00:00 2001 From: shravan Date: Sat, 4 Apr 2020 22:50:05 +0530 Subject: [PATCH] 753 fixing tests --- pkg/webhooks/policymutation.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/webhooks/policymutation.go b/pkg/webhooks/policymutation.go index 7dfef34588..7211306adf 100644 --- a/pkg/webhooks/policymutation.go +++ b/pkg/webhooks/policymutation.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "reflect" + "sort" "strconv" "strings" @@ -415,5 +416,9 @@ func replacePodWithPodControllers(kinds []string, controllers []string) []string output = append(output, kind) } + sort.Slice(output, func(i, j int) bool { + return output[i] < output[j] + }) + return output }