Skip to content

Commit

Permalink
Merge pull request #575 from zhsj/fix-panic
Browse files Browse the repository at this point in the history
bandwidth: fix panic in tests
  • Loading branch information
bboreham committed Jan 27, 2021
2 parents 8c66d68 + 343d233 commit d1769dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/meta/bandwidth/bandwidth_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ var _ = Describe("bandwidth test", func() {

containerWithTbfRes, _, err = testutils.CmdAdd(containerWithTbfNS.Path(), "dummy", containerWithTbfIFName, []byte(ptpConf), func() error {
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
Expect(err).NotTo(HaveOccurred())
Expect(r.Print()).To(Succeed())

return err
Expand All @@ -944,6 +945,7 @@ var _ = Describe("bandwidth test", func() {

containerWithoutTbfRes, _, err = testutils.CmdAdd(containerWithoutTbfNS.Path(), "dummy2", containerWithoutTbfIFName, []byte(ptpConf), func() error {
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
Expect(err).NotTo(HaveOccurred())
Expect(r.Print()).To(Succeed())

return err
Expand Down Expand Up @@ -1081,6 +1083,7 @@ var _ = Describe("bandwidth test", func() {

containerWithTbfRes, _, err = testutils.CmdAdd(containerWithTbfNS.Path(), "dummy", containerWithTbfIFName, []byte(ptpConf), func() error {
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
Expect(err).NotTo(HaveOccurred())
Expect(r.Print()).To(Succeed())

return err
Expand All @@ -1089,6 +1092,7 @@ var _ = Describe("bandwidth test", func() {

containerWithoutTbfRes, _, err = testutils.CmdAdd(containerWithoutTbfNS.Path(), "dummy2", containerWithoutTbfIFName, []byte(ptpConf), func() error {
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
Expect(err).NotTo(HaveOccurred())
Expect(r.Print()).To(Succeed())

return err
Expand Down

0 comments on commit d1769dd

Please sign in to comment.