use of com.sequenceiq.cloudbreak.cloud.model.nosql.NoSqlTableDeleteRequest in project cloudbreak by hortonworks.
the class AwsNoSqlConnectorTest method getNoSqlTableAwsError.
@Test
public void getNoSqlTableAwsError() {
when(dynamoDb.deleteTable(argThat((ArgumentMatcher<String>) argument -> true))).thenThrow(new AmazonDynamoDBException("provider error"));
thrown.expect(CloudConnectorException.class);
thrown.expectMessage("provider error");
underTest.deleteNoSqlTable(new NoSqlTableDeleteRequest());
}
use of com.sequenceiq.cloudbreak.cloud.model.nosql.NoSqlTableDeleteRequest in project cloudbreak by hortonworks.
the class AwsNoSqlConnectorTest method getNoSqlTableResourceNotFound.
@Test
public void getNoSqlTableResourceNotFound() {
when(dynamoDb.deleteTable(argThat((ArgumentMatcher<String>) argument -> true))).thenThrow(new ResourceNotFoundException("not found"));
NoSqlTableDeleteResponse result = underTest.deleteNoSqlTable(new NoSqlTableDeleteRequest());
assertNull(result.getId());
assertNull(result.getTableStatus());
assertEquals(ResponseStatus.RESOURCE_NOT_FOUND, result.getStatus());
}
Aggregations