WithNetNS restores original namespace when callback errors
- adds test coverage of WithNetNS in BDD-style
This commit is contained in:
20
ns/ns_suite_test.go
Normal file
20
ns/ns_suite_test.go
Normal 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")
|
||||
}
|
Reference in New Issue
Block a user