Skip to content

Commit cb342ae

Browse files
junit resolution
1 parent 120e86f commit cb342ae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriverTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,11 @@ private void stubVolumeCloneFromTemplate(long templateSize, long volumeSize) {
967967
when(storagePoolDao.findById(1L)).thenReturn(storagePool);
968968
when(storagePool.getId()).thenReturn(1L);
969969
lenient().when(storagePool.getName()).thenReturn("vol1");
970-
lenient().when(storagePool.getPoolType()).thenReturn(Storage.StoragePoolType.OntapiSCSI);
970+
// Upstream has no OntapiSCSI; match lifecycle mapping (ISCSI->Iscsi, NFS->NetworkFilesystem).
971+
boolean nfs = ProtocolType.NFS3.name().equalsIgnoreCase(
972+
storagePoolDetails.get(OntapStorageConstants.PROTOCOL));
973+
lenient().when(storagePool.getPoolType()).thenReturn(
974+
nfs ? Storage.StoragePoolType.NetworkFilesystem : Storage.StoragePoolType.Iscsi);
971975
lenient().when(storagePool.getHypervisor()).thenReturn(Hypervisor.HypervisorType.KVM);
972976
when(storagePoolDetailsDao.listDetailsKeyPairs(1L)).thenReturn(storagePoolDetails);
973977

0 commit comments

Comments
 (0)