linter: fix ginkgolinter errors

Use:
- `BeEmpty` instead of `HaveLen(0)`
- `Expect(x).To(BeZero())` instead of `Expect(x == 0).To(BeTrue())`

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
This commit is contained in:
Miguel Duarte Barroso 2023-04-04 16:08:58 +02:00
parent deec68747e
commit 7bbd4d19e9
2 changed files with 3 additions and 3 deletions

View File

@ -283,7 +283,7 @@ var _ = Describe("Link", func() {
// this will delete the host endpoint too
addr, err := ip.DelLinkByNameAddr(containerVethName)
Expect(err).NotTo(HaveOccurred())
Expect(addr).To(HaveLen(0))
Expect(addr).To(BeEmpty())
return nil
})
})

View File

@ -914,7 +914,7 @@ var _ = Describe("tuning plugin", func() {
link, err := netlink.LinkByName(IFNAME)
Expect(err).NotTo(HaveOccurred())
Expect(link.Attrs().RawFlags&unix.IFF_ALLMULTI != 0).To(BeTrue())
Expect(link.Attrs().RawFlags & unix.IFF_ALLMULTI).NotTo(BeZero())
if testutils.SpecVersionHasCHECK(ver) {
n := &TuningConf{}
@ -995,7 +995,7 @@ var _ = Describe("tuning plugin", func() {
link, err := netlink.LinkByName(IFNAME)
Expect(err).NotTo(HaveOccurred())
Expect(link.Attrs().RawFlags&unix.IFF_ALLMULTI != 0).To(BeTrue())
Expect(link.Attrs().RawFlags & unix.IFF_ALLMULTI).NotTo(BeZero())
err = testutils.CmdDel(originalNS.Path(),
args.ContainerID, "", func() error { return cmdDel(args) })