WithNetNS restores original namespace when callback errors

- adds test coverage of WithNetNS in BDD-style
This commit is contained in:
Gabe Rosenhouse
2016-03-14 18:57:16 -07:00
parent 05683bf11d
commit b99854d124
3 changed files with 175 additions and 2 deletions

20
ns/ns_suite_test.go Normal file
View File

@ -0,0 +1,20 @@
package ns_test
import (
"math/rand"
"runtime"
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
. "github.com/onsi/gomega"
"testing"
)
func TestNs(t *testing.T) {
rand.Seed(config.GinkgoConfig.RandomSeed)
runtime.LockOSThread()
RegisterFailHandler(Fail)
RunSpecs(t, "pkg/ns Suite")
}