From bc8fef7ba9180647566ce36825151f96fc4f8a79 Mon Sep 17 00:00:00 2001 From: "Carol A. Scott" Date: Mon, 19 Aug 2019 11:10:26 -0600 Subject: [PATCH] Sorting the expected response for trafficsplit rows so it is always in consistent row order (#3280) --- controller/api/public/test_helper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controller/api/public/test_helper.go b/controller/api/public/test_helper.go index 1a6f54026..d6fc26f96 100644 --- a/controller/api/public/test_helper.go +++ b/controller/api/public/test_helper.go @@ -350,6 +350,9 @@ func GenStatTsResponse(resName, resType string, resNs []string, basicStats bool, } } + // sort rows before returning in order to have a consistent order for tests + rows = sortTrafficSplitRows(rows) + resp := pb.StatSummaryResponse{ Response: &pb.StatSummaryResponse_Ok_{ // https://github.com/golang/protobuf/issues/205 Ok: &pb.StatSummaryResponse_Ok{