pkg/ns: Add missing error checks
Signed-off-by: Michal Rostecki <mrostecki@suse.de>
This commit is contained in:
parent
26834c3e63
commit
947a5881fc
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2016 CNI authors
|
// Copyright 2016-2018 CNI authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -112,6 +112,7 @@ var _ = Describe("Linux namespace operations", func() {
|
|||||||
Expect(hostNSInode).To(Equal(origNSInode))
|
Expect(hostNSInode).To(Equal(origNSInode))
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
@ -224,6 +225,7 @@ var _ = Describe("Linux namespace operations", func() {
|
|||||||
Describe("IsNSorErr", func() {
|
Describe("IsNSorErr", func() {
|
||||||
It("should detect a namespace", func() {
|
It("should detect a namespace", func() {
|
||||||
createdNetNS, err := testutils.NewNS()
|
createdNetNS, err := testutils.NewNS()
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
defer testutils.UnmountNS(createdNetNS)
|
defer testutils.UnmountNS(createdNetNS)
|
||||||
err = ns.IsNSorErr(createdNetNS.Path())
|
err = ns.IsNSorErr(createdNetNS.Path())
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user