Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
  • Loading branch information
Valeriy Khorunzhin committed Jan 15, 2025
1 parent 37b7d4e commit 6d1ee4b
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ var _ = Describe("func areVirtualDisksAllowedToUse", func() {
var vdFoo *virtv2.VirtualDisk
var vdBar *virtv2.VirtualDisk

blockDevicesConnectedCount := 3

blockDeviceHandlerMock := &IBlockDeviceServiceMock{}
blockDeviceHandlerMock.CountBlockDevicesAttachedToVmFunc = func(_ context.Context, vm *virtv2.VirtualMachine) (int, error) {
return blockDevicesConnectedCount, nil
return 1, nil
}

BeforeEach(func() {
Expand Down Expand Up @@ -160,11 +158,9 @@ var _ = Describe("BlockDeviceHandler", func() {
var vdFoo *virtv2.VirtualDisk
var vdBar *virtv2.VirtualDisk

blockDevicesConnectedCount := 3

blockDeviceHandlerMock := &IBlockDeviceServiceMock{}
blockDeviceHandlerMock.CountBlockDevicesAttachedToVmFunc = func(_ context.Context, vm *virtv2.VirtualMachine) (int, error) {
return blockDevicesConnectedCount, nil
return 1, nil
}

getBlockDevicesState := func(vi *virtv2.VirtualImage, cvi *virtv2.ClusterVirtualImage, vdFoo, vdBar *virtv2.VirtualDisk) BlockDevicesState {
Expand Down

0 comments on commit 6d1ee4b

Please sign in to comment.