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=cfedcfd8f23a58091d415c11885d1aafb0ceb6f6;p=plugins.git skel/test: add case for empty NETNS --- diff --git a/skel/skel_test.go b/skel/skel_test.go index 4469564..a52e014 100644 --- a/skel/skel_test.go +++ b/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) + }) + }) })