From: Stefan Junker Date: Fri, 27 May 2016 10:26:42 +0000 (+0200) Subject: skel/test: add case for empty NETNS X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=d582c9ce8f94536c5c8fe2bc3b01304d82871047;p=cni.git skel/test: add case for empty NETNS --- diff --git a/pkg/skel/skel_test.go b/pkg/skel/skel_test.go index 4469564..a52e014 100644 --- a/pkg/skel/skel_test.go +++ b/pkg/skel/skel_test.go @@ -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) + }) + }) })