use of com.mesosphere.sdk.state.ConfigStoreException in project dcos-commons by mesosphere.
the class ConfigQueriesTest method testGetTargetFailsTargetId.
@Test
public void testGetTargetFailsTargetId() throws ConfigStoreException {
when(mockConfigStore.getTargetConfig()).thenThrow(new ConfigStoreException(Reason.STORAGE_ERROR, "hi"));
Response response = ConfigQueries.getTarget(mockConfigStore);
assertEquals(500, response.getStatus());
}
use of com.mesosphere.sdk.state.ConfigStoreException in project dcos-commons by mesosphere.
the class ConfigQueriesTest method testGetConfigIdsFails.
@Test
public void testGetConfigIdsFails() throws ConfigStoreException {
when(mockConfigStore.list()).thenThrow(new ConfigStoreException(Reason.STORAGE_ERROR, "hello"));
Response response = ConfigQueries.getConfigurationIds(mockConfigStore);
assertEquals(500, response.getStatus());
}
Aggregations