fix new linter warnings in mediated_devices_types_test.go
@@ -315,14 +315,14 @@ var _ = Describe("Mediated Devices Types configuration", func() {
Expect(numberOfCreatedMDEVs).To(BeZero(), msg)
}
}
- Expect(len(desiredDevicesToConfigure)).To(BeZero(), "add types should be created")
+ Expect(desiredDevicesToConfigure).To(BeEmpty(), "add types should be created")
}
By("removing all created mdevs")
mdevManager.updateMDEVTypesConfiguration([]string{})
files, err := ioutil.ReadDir(fakeMdevDevicesPath)
Expect(err).ToNot(HaveOccurred())
- Expect(len(files)).To(BeZero())
+ Expect(files).To(BeEmpty())
},
Entry("spread types accoss identical cards", spreadTypesAccossIdenticalCard),
Entry("one yype many cards", oneTypeManyCards),
@@ -425,7 +425,7 @@ var _ = Describe("Mediated Devices Types configuration", func() {
Expect(numberOfCreatedMDEVs).To(BeZero(), msg)
}
}
- Expect(len(desiredDevicesToConfigure)).To(BeZero(), "add types should be created")
+ Expect(desiredDevicesToConfigure).To(BeEmpty(), "add types should be created")
}
By("removing all created mdevs")
@@ -434,7 +434,7 @@ var _ = Describe("Mediated Devices Types configuration", func() {
deviceController.refreshMediatedDevicesTypes()
files, err := ioutil.ReadDir(fakeMdevDevicesPath)
Expect(err).ToNot(HaveOccurred())
- Expect(len(files)).To(BeZero())
+ Expect(files).To(BeEmpty())
},
Entry("configure default mdev types", deafultTypesNotNodeSpecific),
Entry("configure mdev types that match all node selectors", matchAllNodeLabels),
