From b0b896f79a7742a9e141cde584733d3a01d53725 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 18 Jan 2017 16:39:57 -0600 Subject: [PATCH] plugins/flannel: organize test JSON alphabetically Otherwise the test fails, since Go's JSON marshaller prints dict items alphabetically in its String() call. --- plugins/meta/flannel/flannel_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/meta/flannel/flannel_test.go b/plugins/meta/flannel/flannel_test.go index 2bda2168..51fdc6fb 100644 --- a/plugins/meta/flannel/flannel_test.go +++ b/plugins/meta/flannel/flannel_test.go @@ -114,20 +114,20 @@ FLANNEL_IPMASQ=true netConfBytes, err := ioutil.ReadFile(path) Expect(err).NotTo(HaveOccurred()) expected := `{ - "name" : "cni-flannel", - "type" : "bridge", + "ipMasq" : false, "ipam" : { - "type" : "host-local", - "subnet" : "10.1.17.0/24", "routes" : [ { "dst" : "10.1.0.0/16" } - ] + ], + "subnet" : "10.1.17.0/24", + "type" : "host-local" }, + "isGateway": true, "mtu" : 1472, - "ipMasq" : false, - "isGateway": true + "name" : "cni-flannel", + "type" : "bridge" } ` Expect(netConfBytes).Should(MatchJSON(expected))