plugins/flannel: organize test JSON alphabetically
Otherwise the test fails, since Go's JSON marshaller prints dict items alphabetically in its String() call.
This commit is contained in:
parent
ad2a5ccb61
commit
b0b896f79a
@ -114,20 +114,20 @@ FLANNEL_IPMASQ=true
|
|||||||
netConfBytes, err := ioutil.ReadFile(path)
|
netConfBytes, err := ioutil.ReadFile(path)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
expected := `{
|
expected := `{
|
||||||
"name" : "cni-flannel",
|
"ipMasq" : false,
|
||||||
"type" : "bridge",
|
|
||||||
"ipam" : {
|
"ipam" : {
|
||||||
"type" : "host-local",
|
|
||||||
"subnet" : "10.1.17.0/24",
|
|
||||||
"routes" : [
|
"routes" : [
|
||||||
{
|
{
|
||||||
"dst" : "10.1.0.0/16"
|
"dst" : "10.1.0.0/16"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"subnet" : "10.1.17.0/24",
|
||||||
|
"type" : "host-local"
|
||||||
},
|
},
|
||||||
|
"isGateway": true,
|
||||||
"mtu" : 1472,
|
"mtu" : 1472,
|
||||||
"ipMasq" : false,
|
"name" : "cni-flannel",
|
||||||
"isGateway": true
|
"type" : "bridge"
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
Expect(netConfBytes).Should(MatchJSON(expected))
|
Expect(netConfBytes).Should(MatchJSON(expected))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user