pkg/ns: Add missing error checks

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
This commit is contained in:
Michal Rostecki 2018-09-20 11:05:15 +02:00
parent 26834c3e63
commit 947a5881fc

View File

@ -1,4 +1,4 @@
// Copyright 2016 CNI authors
// Copyright 2016-2018 CNI authors
//
// Licensed under the Apache License, Version 2.0 (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))
return nil
})
Expect(err).NotTo(HaveOccurred())
return nil
})
Expect(err).NotTo(HaveOccurred())
@ -224,6 +225,7 @@ var _ = Describe("Linux namespace operations", func() {
Describe("IsNSorErr", func() {
It("should detect a namespace", func() {
createdNetNS, err := testutils.NewNS()
Expect(err).NotTo(HaveOccurred())
defer testutils.UnmountNS(createdNetNS)
err = ns.IsNSorErr(createdNetNS.Path())
Expect(err).NotTo(HaveOccurred())