mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-08-26 12:03:18 +00:00
Adding changes so i will have them saved for my remote fork thingy
This commit is contained in:
parent
3853c6c377
commit
b0e3b05b3c
@ -52,6 +52,24 @@ var _ = Describe("config operations", func() {
|
|||||||
Expect(len(netConf.RuntimeConfig.PortMaps)).To(Equal(1))
|
Expect(len(netConf.RuntimeConfig.PortMaps)).To(Equal(1))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
It("fails to load invalid multus configuration", func() {
|
||||||
|
conf := `{
|
||||||
|
"name": "node-cni-network",
|
||||||
|
"type": "multus",
|
||||||
|
"kubeconfig": "/etc/kubernetes/node-kubeconfig.yaml",
|
||||||
|
"delegates": [{
|
||||||
|
"type": "weave-net"
|
||||||
|
}],
|
||||||
|
"runtimeConfig": {
|
||||||
|
"portMappings": [
|
||||||
|
{"hostPort": 8080, "containerPort": 80, "protocol": "tcp"}
|
||||||
|
]
|
||||||
|
}`
|
||||||
|
// missing end bracket
|
||||||
|
netConf, err := LoadNetConf([]byte(conf))
|
||||||
|
Expect(err).To(HaveOccurred())
|
||||||
|
})
|
||||||
|
|
||||||
It("succeeds if only delegates are set", func() {
|
It("succeeds if only delegates are set", func() {
|
||||||
conf := `{
|
conf := `{
|
||||||
"name": "node-cni-network",
|
"name": "node-cni-network",
|
||||||
|
Loading…
Reference in New Issue
Block a user