Fix access credential unit tests
@@ -871,6 +871,8 @@ var _ = Describe("VirtualMachineInstance", func() {
client.EXPECT().SyncVirtualMachine(vmi, gomock.Any())
vmiInterface.EXPECT().Update(NewVMICondMatcher(*updatedVMI))
+ mockHotplugVolumeMounter.EXPECT().Unmount(gomock.Any()).Return(nil)
+ mockHotplugVolumeMounter.EXPECT().Mount(gomock.Any()).Return(nil)
controller.Execute()
@@ -910,6 +912,8 @@ var _ = Describe("VirtualMachineInstance", func() {
client.EXPECT().SyncVirtualMachine(vmi, gomock.Any())
vmiInterface.EXPECT().Update(NewVMICondMatcher(*vmiCopy))
+ mockHotplugVolumeMounter.EXPECT().Unmount(gomock.Any()).Return(nil)
+ mockHotplugVolumeMounter.EXPECT().Mount(gomock.Any()).Return(nil)
controller.Execute()
// should not make another event entry unless something changes
@@ -962,6 +966,8 @@ var _ = Describe("VirtualMachineInstance", func() {
client.EXPECT().SyncVirtualMachine(vmi, gomock.Any())
vmiInterface.EXPECT().Update(NewVMICondMatcher(*vmiCopy))
+ mockHotplugVolumeMounter.EXPECT().Unmount(gomock.Any()).Return(nil)
+ mockHotplugVolumeMounter.EXPECT().Mount(gomock.Any()).Return(nil)
controller.Execute()
expectEvent(string(v1.AccessCredentialsSyncFailed), true)
