Skip to content

Commit

Permalink
mgmtfn/k8splugin: fix test setup
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Staretu <[email protected]>
  • Loading branch information
unclejack committed Jul 5, 2017
1 parent a9dde45 commit fccea5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mgmtfn/k8splugin/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ func (s *NetSetup) SetUpTest(c *C) {
}
s.globalNS = globalNS
defer func() {
netns.Set(globalNS)
currNS, _ := netns.Get()
if !globalNS.Equal(currNS) {
netns.Set(globalNS)
}
}()

newNS, err := netns.New()
Expand Down

0 comments on commit fccea5c

Please sign in to comment.