shwstppr commented on code in PR #10034: URL: https://github.com/apache/cloudstack/pull/10034#discussion_r1872817195
########## plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptorTest.java: ########## @@ -78,14 +93,87 @@ public void testCreateStoragePoolWithNFSMountOpts() throws Exception { Connect conn = Mockito.mock(Connect.class); StoragePool sp = Mockito.mock(StoragePool.class); - StoragePoolInfo spinfo = Mockito.mock(StoragePoolInfo.class); Mockito.when(LibvirtConnection.getConnection()).thenReturn(conn); Mockito.when(conn.storagePoolLookupByUUIDString(uuid)).thenReturn(sp); Mockito.when(sp.isActive()).thenReturn(1); Mockito.when(sp.getXMLDesc(0)).thenReturn(poolXml); + Mockito.when(Script.runSimpleBashScriptForExitValue(anyString())).thenReturn(-1); Map<String, String> details = new HashMap<>(); details.put("nfsmountopts", "vers=4.1, nconnect=4"); KVMStoragePool pool = libvirtStorageAdaptor.createStoragePool(uuid, null, 0, dir, null, Storage.StoragePoolType.NetworkFilesystem, details, true); Review Comment: @abh1sar can you please make the changes in a separate PR, I'll rebase? I tried your changes while removing expected exception and it failed for me locally - first with NPE for storageLayer and then a CloudRuntimeException -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org