From c6dd6cb4109c5d9cd6fe64e3e0d2d4c446735190 Mon Sep 17 00:00:00 2001 From: Joe Beda Date: Sat, 14 Jun 2014 14:42:00 -0700 Subject: [PATCH] Stable comparison of stuff that transits through map. There are probably more of these in the codebase. Looks like this happens with the go tip via travis. --- pkg/client/client_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index ecd4dd4ea3d..eb0f619c999 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -122,11 +122,8 @@ func TestListPodsLabels(t *testing.T) { fakeHandler.ValidateRequest(t, makeUrl("/pods"), "GET", nil) queryString := fakeHandler.RequestReceived.URL.Query().Get("labels") queryString, _ = url.QueryUnescape(queryString) - // TODO(bburns) : This assumes some ordering in serialization that might not always - // be true, parse it into a map. - if queryString != "foo=bar,name=baz" { - t.Errorf("Unexpected label query: %s", queryString) - } + parsedQueryString := DecodeLabelQuery(queryString) + expectEqual(t, query, parsedQueryString) if err != nil { t.Errorf("Unexpected error in listing pods: %#v", err) }