mirror of https://github.com/apache/cloudstack.git
Fixup updateSnapshotInfo failure due to forward merging (#8150)
Fixes build failures
This commit is contained in:
parent
587d1d7dba
commit
a06f8a8763
|
|
@ -570,7 +570,7 @@ public class SnapshotManagerImpl extends MutualExclusiveIdsManagerBase implement
|
|||
if ((storagePool.getPoolType() == StoragePoolType.NetworkFilesystem || storagePool.getPoolType() == StoragePoolType.Filesystem) && vmSnapshot.getType() == VMSnapshot.Type.Disk) {
|
||||
List<VMSnapshotDetailsVO> vmSnapshotDetails = vmSnapshotDetailsDao.findDetails(vmSnapshotId, "kvmStorageSnapshot");
|
||||
for (VMSnapshotDetailsVO vmSnapshotDetailsVO : vmSnapshotDetails) {
|
||||
SnapshotInfo sInfo = snapshotDataFactory.getSnapshot(Long.parseLong(vmSnapshotDetailsVO.getValue()), DataStoreRole.Primary);
|
||||
SnapshotInfo sInfo = snapshotDataFactory.getSnapshot(Long.parseLong(vmSnapshotDetailsVO.getValue()), storagePool.getId(), DataStoreRole.Primary);
|
||||
if (sInfo.getVolumeId() == volumeId) {
|
||||
snapshotOnPrimaryStore.setState(ObjectInDataStoreStateMachine.State.Ready);
|
||||
snapshotOnPrimaryStore.setInstallPath(sInfo.getPath());
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public class SnapshotManagerImplTest {
|
|||
@Mock
|
||||
SnapshotService snapshotService;
|
||||
@Mock
|
||||
SnapshotDataFactory snapshotDataFactory;
|
||||
SnapshotDataFactory snapshotFactory;
|
||||
@Mock
|
||||
ResourceLimitService resourceLimitService;
|
||||
@Mock
|
||||
|
|
@ -269,7 +269,7 @@ public class SnapshotManagerImplTest {
|
|||
Mockito.when(store.getId()).thenReturn(storeId);
|
||||
Mockito.when(dataStoreManager.getDataStore(storeId, DataStoreRole.Image)).thenReturn(store);
|
||||
Mockito.when(snapshotStoreDao.listReadyBySnapshot(snapshotId, DataStoreRole.Image)).thenReturn(snapshotStoreList);
|
||||
Mockito.when(snapshotDataFactory.getSnapshot(Mockito.anyLong(), Mockito.any())).thenReturn(Mockito.mock(SnapshotInfo.class));
|
||||
Mockito.when(snapshotFactory.getSnapshot(Mockito.anyLong(), Mockito.any())).thenReturn(Mockito.mock(SnapshotInfo.class));
|
||||
CreateCmdResult result = Mockito.mock(CreateCmdResult.class);
|
||||
Mockito.when(result.isFailed()).thenReturn(false);
|
||||
Mockito.when(result.getPath()).thenReturn("SOMEPATH");
|
||||
|
|
|
|||
Loading…
Reference in New Issue