skel/test: add case for empty NETNS

This commit is contained in:
Stefan Junker 2016-05-27 12:26:42 +02:00
parent 5fe036b88a
commit cfedcfd8f2

View File

@ -71,5 +71,14 @@ var _ = Describe("Skel", func() {
// Expect(err).NotTo(HaveOccurred())
// PluginMain(fErr, nil)
// })
It("should not fail with DEL and no NETNS and noop callback", func() {
err := os.Setenv("CNI_COMMAND", "DEL")
Expect(err).NotTo(HaveOccurred())
err = os.Unsetenv("CNI_NETNS")
Expect(err).NotTo(HaveOccurred())
PluginMain(nil, fNoop)
})
})
})