skel: Plugins require a cniVersion in the NetConf
This commit is contained in:

committed by
Gabe Rosenhouse

parent
56032390fe
commit
fd150a4c97
@ -51,8 +51,9 @@ var _ = Describe("bridge Operations", func() {
|
||||
|
||||
conf := &NetConf{
|
||||
NetConf: types.NetConf{
|
||||
Name: "testConfig",
|
||||
Type: "bridge",
|
||||
CNIVersion: "0.2.0",
|
||||
Name: "testConfig",
|
||||
Type: "bridge",
|
||||
},
|
||||
BrName: IFNAME,
|
||||
IsGW: false,
|
||||
@ -95,8 +96,9 @@ var _ = Describe("bridge Operations", func() {
|
||||
|
||||
conf := &NetConf{
|
||||
NetConf: types.NetConf{
|
||||
Name: "testConfig",
|
||||
Type: "bridge",
|
||||
CNIVersion: "0.2.0",
|
||||
Name: "testConfig",
|
||||
Type: "bridge",
|
||||
},
|
||||
BrName: IFNAME,
|
||||
IsGW: false,
|
||||
@ -126,12 +128,14 @@ var _ = Describe("bridge Operations", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
conf := fmt.Sprintf(`{
|
||||
"cniVersion": "0.2.0",
|
||||
"name": "mynet",
|
||||
"type": "bridge",
|
||||
"bridge": "%s",
|
||||
"isDefaultGateway": true,
|
||||
"ipMasq": false,
|
||||
"ipam": {
|
||||
"cniVersion": "0.2.0",
|
||||
"type": "host-local",
|
||||
"subnet": "%s"
|
||||
}
|
||||
@ -253,15 +257,15 @@ var _ = Describe("bridge Operations", func() {
|
||||
})
|
||||
|
||||
It("ensure bridge address", func() {
|
||||
|
||||
const IFNAME = "bridge0"
|
||||
const EXPECTED_IP = "10.0.0.0/8"
|
||||
const CHANGED_EXPECTED_IP = "10.1.2.3/16"
|
||||
|
||||
conf := &NetConf{
|
||||
NetConf: types.NetConf{
|
||||
Name: "testConfig",
|
||||
Type: "bridge",
|
||||
CNIVersion: "0.2.0",
|
||||
Name: "testConfig",
|
||||
Type: "bridge",
|
||||
},
|
||||
BrName: IFNAME,
|
||||
IsGW: true,
|
||||
@ -320,5 +324,4 @@ var _ = Describe("bridge Operations", func() {
|
||||
})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user