plugins/main: Add missing error checks

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
This commit is contained in:
Michal Rostecki 2018-09-20 11:06:28 +02:00
parent 1a3f49c7ae
commit 8c61a2c2f3

View File

@ -1,4 +1,4 @@
// Copyright 2015 CNI authors // Copyright 2015-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.
@ -431,6 +431,7 @@ func (tester *testerV03x) cmdDelTest(tc testCase) {
Expect(link).To(BeNil()) Expect(link).To(BeNil())
return nil return nil
}) })
Expect(err).NotTo(HaveOccurred())
} }
type testerV01xOr02x struct { type testerV01xOr02x struct {
@ -939,6 +940,7 @@ var _ = Describe("bridge Operations", func() {
for _, tc := range testCases { for _, tc := range testCases {
tc.cniVersion = "0.3.1" tc.cniVersion = "0.3.1"
_, _, err := setupBridge(tc.netConf()) _, _, err := setupBridge(tc.netConf())
Expect(err).NotTo(HaveOccurred())
link, err := netlink.LinkByName(BRNAME) link, err := netlink.LinkByName(BRNAME)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
origMac := link.Attrs().HardwareAddr origMac := link.Attrs().HardwareAddr