Search in sources :

Example 16 with DBInstance

use of com.amazonaws.services.rds.model.DBInstance in project Synapse-Stack-Builder by Sage-Bionetworks.

the class MySqlDatabaseSetupTest method testDeleteDatabaseInstanceDoesExist.

@Test
public void testDeleteDatabaseInstanceDoesExist() {
    DeleteDBInstanceRequest req = new DeleteDBInstanceRequest();
    req.setDBInstanceIdentifier("someDB");
    when(mockClient.deleteDBInstance(req)).thenReturn(new DBInstance().withDBInstanceIdentifier("someDB"));
    DBInstance inst = databaseSetup.deleteDatabaseInstance(req);
    assertEquals(inst.getDBInstanceIdentifier(), "someDB");
}
Also used : DeleteDBInstanceRequest(com.amazonaws.services.rds.model.DeleteDBInstanceRequest) DBInstance(com.amazonaws.services.rds.model.DBInstance) Test(org.junit.Test)

Aggregations

DBInstance (com.amazonaws.services.rds.model.DBInstance)16 DescribeDBInstancesRequest (com.amazonaws.services.rds.model.DescribeDBInstancesRequest)6 Test (org.junit.Test)6 ArrayList (java.util.ArrayList)4 DeleteDBInstanceRequest (com.amazonaws.services.rds.model.DeleteDBInstanceRequest)3 DescribeDBInstancesResult (com.amazonaws.services.rds.model.DescribeDBInstancesResult)3 ArgumentCaptor (org.mockito.ArgumentCaptor)3 CreateDBInstanceRequest (com.amazonaws.services.rds.model.CreateDBInstanceRequest)2 DomainStatus (com.amazonaws.services.cloudsearchv2.model.DomainStatus)1 ServiceEndpoint (com.amazonaws.services.cloudsearchv2.model.ServiceEndpoint)1 DescribeAlarmsResult (com.amazonaws.services.cloudwatch.model.DescribeAlarmsResult)1 PutMetricAlarmRequest (com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest)1 KeyPairInfo (com.amazonaws.services.ec2.model.KeyPairInfo)1 ApplicationVersionDescription (com.amazonaws.services.elasticbeanstalk.model.ApplicationVersionDescription)1 ServerCertificateMetadata (com.amazonaws.services.identitymanagement.model.ServerCertificateMetadata)1 DBInstanceNotFoundException (com.amazonaws.services.rds.model.DBInstanceNotFoundException)1 Endpoint (com.amazonaws.services.rds.model.Endpoint)1 LinkedList (java.util.LinkedList)1 Properties (java.util.Properties)1 Before (org.junit.Before)1