Merge pull request #575 from zhsj/fix-panic
bandwidth: fix panic in tests
This commit is contained in:
commit
d1769ddd68
@ -936,6 +936,7 @@ var _ = Describe("bandwidth test", func() {
|
|||||||
|
|
||||||
containerWithTbfRes, _, err = testutils.CmdAdd(containerWithTbfNS.Path(), "dummy", containerWithTbfIFName, []byte(ptpConf), func() error {
|
containerWithTbfRes, _, err = testutils.CmdAdd(containerWithTbfNS.Path(), "dummy", containerWithTbfIFName, []byte(ptpConf), func() error {
|
||||||
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
|
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
Expect(r.Print()).To(Succeed())
|
Expect(r.Print()).To(Succeed())
|
||||||
|
|
||||||
return err
|
return err
|
||||||
@ -944,6 +945,7 @@ var _ = Describe("bandwidth test", func() {
|
|||||||
|
|
||||||
containerWithoutTbfRes, _, err = testutils.CmdAdd(containerWithoutTbfNS.Path(), "dummy2", containerWithoutTbfIFName, []byte(ptpConf), func() error {
|
containerWithoutTbfRes, _, err = testutils.CmdAdd(containerWithoutTbfNS.Path(), "dummy2", containerWithoutTbfIFName, []byte(ptpConf), func() error {
|
||||||
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
|
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
Expect(r.Print()).To(Succeed())
|
Expect(r.Print()).To(Succeed())
|
||||||
|
|
||||||
return err
|
return err
|
||||||
@ -1081,6 +1083,7 @@ var _ = Describe("bandwidth test", func() {
|
|||||||
|
|
||||||
containerWithTbfRes, _, err = testutils.CmdAdd(containerWithTbfNS.Path(), "dummy", containerWithTbfIFName, []byte(ptpConf), func() error {
|
containerWithTbfRes, _, err = testutils.CmdAdd(containerWithTbfNS.Path(), "dummy", containerWithTbfIFName, []byte(ptpConf), func() error {
|
||||||
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
|
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
Expect(r.Print()).To(Succeed())
|
Expect(r.Print()).To(Succeed())
|
||||||
|
|
||||||
return err
|
return err
|
||||||
@ -1089,6 +1092,7 @@ var _ = Describe("bandwidth test", func() {
|
|||||||
|
|
||||||
containerWithoutTbfRes, _, err = testutils.CmdAdd(containerWithoutTbfNS.Path(), "dummy2", containerWithoutTbfIFName, []byte(ptpConf), func() error {
|
containerWithoutTbfRes, _, err = testutils.CmdAdd(containerWithoutTbfNS.Path(), "dummy2", containerWithoutTbfIFName, []byte(ptpConf), func() error {
|
||||||
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
|
r, err := invoke.DelegateAdd(context.TODO(), "ptp", []byte(ptpConf), nil)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
Expect(r.Print()).To(Succeed())
|
Expect(r.Print()).To(Succeed())
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user