use of com.emc.metalnx.core.domain.entity.DataGridServer in project metalnx-web by irods-contrib.
the class TestPluginService method testMSIListForIRODS420.
@Test
public void testMSIListForIRODS420() throws DataGridConnectionRefusedException, DataGridRuleException {
when(mockRuleService.execGetMSIsRule(anyString())).thenReturn(new ArrayList<>());
when(irodsServices.isAtLeastIrods420()).thenReturn(true);
DataGridServer server = msiService.getMSIsInstalled("server1.test.com");
assertFalse(server.isThereAnyMSI());
}
use of com.emc.metalnx.core.domain.entity.DataGridServer in project metalnx-web by irods-contrib.
the class TestPluginService method testMSIInstalledList.
@Test
public void testMSIInstalledList() throws DataGridConnectionRefusedException {
DataGridServer server = msiService.getMSIsInstalled("server1.test.com");
Map<String, Boolean> mlxMSIsMap = server.getMetalnxMSIs();
Map<String, Boolean> iRODSMSIsMap = server.getIRODSMSIs();
Map<String, Boolean> otherMSIsList = server.getOtherMSIs();
for (String msi : irods41XMSIs) assertTrue(iRODSMSIsMap.containsKey(msi));
for (String msi : mlxMSIList) assertTrue(mlxMSIsMap.containsKey(msi));
for (String msi : otherMSIList) assertTrue(otherMSIsList.containsKey(msi));
}
use of com.emc.metalnx.core.domain.entity.DataGridServer in project metalnx-web by irods-contrib.
the class TestServerUtil method testNullJsonResponse.
@Test
public void testNullJsonResponse() throws DataGridConnectionRefusedException {
DataGridServer server = new DataGridServer();
server.setHostname("icat.test.com");
ServerUtil.populateDataGridServerStatus(null, server);
assertEquals(server.getMachineStatus(), ServerRequestInfoType.WARNING_STATUS.toString());
assertEquals(server.getDataGridStatus(), ServerRequestInfoType.WARNING_STATUS.toString());
assertEquals(server.getDiskStatus(), ServerRequestInfoType.WARNING_STATUS.toString());
assertEquals(server.getMemoryStatus(), ServerRequestInfoType.WARNING_STATUS.toString());
}
use of com.emc.metalnx.core.domain.entity.DataGridServer in project metalnx-web by irods-contrib.
the class TestServerUtil method testEmptyJsonResponse.
@Test
public void testEmptyJsonResponse() throws DataGridConnectionRefusedException {
DataGridServer server = new DataGridServer();
server.setHostname("icat.test.com");
ServerUtil.populateDataGridServerStatus("", server);
assertEquals(server.getMachineStatus(), ServerRequestInfoType.WARNING_STATUS.toString());
assertEquals(server.getDataGridStatus(), ServerRequestInfoType.WARNING_STATUS.toString());
assertEquals(server.getDiskStatus(), ServerRequestInfoType.WARNING_STATUS.toString());
assertEquals(server.getMemoryStatus(), ServerRequestInfoType.WARNING_STATUS.toString());
}
use of com.emc.metalnx.core.domain.entity.DataGridServer in project metalnx-web by irods-contrib.
the class TestMSIService method testNoOtherMSIInstalledFor41.
@Test
public void testNoOtherMSIInstalledFor41() throws DataGridConnectionRefusedException, DataGridRuleException {
when(irodsServices.isAtLeastIrods420()).thenReturn(false);
when(mockRuleService.execGetMSIsRule(anyString())).thenReturn(new ArrayList<>());
when(mockConfigService.getOtherMSIsExpected()).thenReturn(new ArrayList<>());
DataGridServer server = msiService.getMSIsInstalled("server1.test.com");
assertFalse(server.isThereAnyMSI());
assertTrue(server.getOtherMSIs().isEmpty());
}
Aggregations