pkg/ns: remove namespace creation (and move to testutils)

Namespace creation had an unergonomic interface and isn't used, except
for testing code. Remove it; downstream users should really be creating
their own namespaces
This commit is contained in:
Casey Callendrello
2018-03-16 15:17:00 +01:00
parent 1fb94a4222
commit a0eac8d7d9
20 changed files with 225 additions and 143 deletions

View File

@ -34,7 +34,7 @@ var _ = Describe("base functionality", func() {
BeforeEach(func() {
var err error
originalNS, err = ns.NewNS()
originalNS, err = testutils.NewNS()
Expect(err).NotTo(HaveOccurred())
ifname = fmt.Sprintf("dummy-%x", rand.Int31())
@ -65,7 +65,7 @@ var _ = Describe("base functionality", func() {
Expect(err).NotTo(HaveOccurred())
// call CmdAdd
targetNS, err := ns.NewNS()
targetNS, err := testutils.NewNS()
Expect(err).NotTo(HaveOccurred())
CNI_IFNAME := "eth0"