plugins/testutils: pass CNI_CONTAINERID to plugins in testcases
Recent CNI specification changes require the container ID on ADD/DEL, which the testcases were not providing. Fix that up so things work when this repo gets CNI revendored.
This commit is contained in:
@ -69,7 +69,7 @@ var _ = Describe("sample test", func() {
|
||||
IfName: ifname,
|
||||
StdinData: []byte(conf),
|
||||
}
|
||||
_, _, err := testutils.CmdAddWithResult(targetNs.Path(), "eth0", []byte(conf), func() error { return cmdAdd(args) })
|
||||
_, _, err := testutils.CmdAddWithArgs(args, func() error { return cmdAdd(args) })
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
})
|
||||
@ -104,7 +104,7 @@ var _ = Describe("sample test", func() {
|
||||
IfName: "eth0",
|
||||
StdinData: []byte(conf),
|
||||
}
|
||||
_, _, err := testutils.CmdAddWithResult(targetNs.Path(), "eth0", []byte(conf), func() error { return cmdAdd(args) })
|
||||
_, _, err := testutils.CmdAddWithArgs(args, func() error { return cmdAdd(args) })
|
||||
Expect(err).To(MatchError("anotherAwesomeArg must be specified"))
|
||||
|
||||
})
|
||||
@ -130,7 +130,7 @@ var _ = Describe("sample test", func() {
|
||||
IfName: "eth0",
|
||||
StdinData: []byte(conf),
|
||||
}
|
||||
_, _, err := testutils.CmdAddWithResult(targetNs.Path(), "eth0", []byte(conf), func() error { return cmdAdd(args) })
|
||||
_, _, err := testutils.CmdAddWithArgs(args, func() error { return cmdAdd(args) })
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
})
|
||||
|
Reference in New Issue
Block a user