pkg/container-disk/container-disk_test: fix ineffectual assignment to path
@@ -100,6 +100,7 @@ var _ = Describe("ContainerDisk", func() {
path, found, err := GetVolumeMountDirOnHost(vmi)
Expect(err).ToNot(HaveOccurred())
Expect(found).To(BeFalse())
+ Expect(path).To(Equal(""))
// should be found if dir does exist
expectedPath := fmt.Sprintf("%s/1234/volumes/kubernetes.io~empty-dir/container-disks", tmpDir)
@@ -143,6 +144,7 @@ var _ = Describe("ContainerDisk", func() {
path, found, err = GetVolumeMountDirOnHost(vmi)
Expect(err).To(HaveOccurred())
Expect(found).To(BeFalse())
+ Expect(path).To(Equal(""))
})
It("by verifying launcher directory locations", func() {
@@ -152,6 +154,7 @@ var _ = Describe("ContainerDisk", func() {
// This should fail if no file exists
path, err := GetDiskTargetPartFromLauncherView(1)
Expect(err).To(HaveOccurred())
+ Expect(path).To(Equal(""))
expectedPath := fmt.Sprintf("%s/disk_1.img", tmpDir)
_, err = os.Create(expectedPath)
