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:
Dan Williams
2018-04-26 11:16:04 -05:00
parent 1df359a210
commit 731298003c
15 changed files with 84 additions and 68 deletions

View File

@ -103,7 +103,7 @@ FLANNEL_IPMASQ=true
defer GinkgoRecover()
By("calling ADD")
resI, _, err := testutils.CmdAddWithResult(targetNs.Path(), IFNAME, []byte(input), func() error {
resI, _, err := testutils.CmdAddWithArgs(args, func() error {
return cmdAdd(args)
})
Expect(err).NotTo(HaveOccurred())
@ -138,7 +138,7 @@ FLANNEL_IPMASQ=true
Expect(result.IPs).To(HaveLen(1))
By("calling DEL")
err = testutils.CmdDelWithResult(targetNs.Path(), IFNAME, func() error {
err = testutils.CmdDelWithArgs(args, func() error {
return cmdDel(args)
})
Expect(err).NotTo(HaveOccurred())
@ -147,7 +147,7 @@ FLANNEL_IPMASQ=true
Expect(path).ShouldNot(BeAnExistingFile())
By("calling DEL again")
err = testutils.CmdDelWithResult(targetNs.Path(), IFNAME, func() error {
err = testutils.CmdDelWithArgs(args, func() error {
return cmdDel(args)
})
By("check that plugin does not fail due to missing net config")