From 947a5881fcc73ee8447db1bf53536f29d0c4a768 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Thu, 20 Sep 2018 11:05:15 +0200 Subject: [PATCH] pkg/ns: Add missing error checks Signed-off-by: Michal Rostecki --- pkg/ns/ns_linux_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/ns/ns_linux_test.go b/pkg/ns/ns_linux_test.go index b375802c..26e1ecd1 100644 --- a/pkg/ns/ns_linux_test.go +++ b/pkg/ns/ns_linux_test.go @@ -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())