plugins/meta: Add missing error checks
Signed-off-by: Michal Rostecki <mrostecki@suse.de>
This commit is contained in:
parent
8c61a2c2f3
commit
f5f787057d
@ -167,6 +167,7 @@ func createVeth(hostNamespace string, hostVethIfName string, containerNamespace
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
containerNs, err := ns.GetNS(containerNamespace)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
err = containerNs.Do(func(_ ns.NetNS) error {
|
||||
peerAddr := &net.IPNet{
|
||||
IP: hostIP,
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2017 CNI authors
|
||||
// Copyright 2017-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.
|
||||
@ -178,6 +178,7 @@ var _ = Describe("chain tests", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
chains, err := ipt.ListChains(TABLE)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
for _, chain := range chains {
|
||||
if chain == testChain.name {
|
||||
Fail("Chain was not deleted")
|
||||
@ -187,6 +188,7 @@ var _ = Describe("chain tests", func() {
|
||||
err = testChain.teardown(ipt)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
chains, err = ipt.ListChains(TABLE)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
for _, chain := range chains {
|
||||
if chain == testChain.name {
|
||||
Fail("Chain was not deleted")
|
||||
|
Loading…
x
Reference in New Issue
Block a user