@Test(dependsOnMethods = "testAssociate") public void testDisassociateWithOptions() { try { routeTableApi.disassociateRouteTable(TEST_REGION, associationId, dryRun()); Assert.fail("Expected 'DryRunOperation' exception was not thrown"); } catch (AWSResponseException e) { assertDryRun(e); } }
@Test(dependsOnMethods = "testDisassociateWithOptions") public void testDisassociate() { final boolean result = routeTableApi.disassociateRouteTable(TEST_REGION, associationId); assertTrue(result, "Failed to disassociate " + associationId + " from " + routeTable.id()); routeTable = routeTableApi.describeRouteTables(TEST_REGION, routeTable.id()).toList().get(0); assertEquals(routeTable.associationSet().size(), 0, "Found associations where none should exist in " + routeTable.id() + ": " + routeTable.associationSet()); subnetApi.deleteSubnetInRegion(TEST_REGION, subnet.getSubnetId()); }
public void disassociateRouteTable() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/disassociate_route_table.xml"); final boolean result = routeTableApi().disassociateRouteTable(DEFAULT_REGION, "rtbassoc-fb7fed9d"); assertTrue(result, "Failed to disassociate route"); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DisassociateRouteTable&AssociationId=rtbassoc-fb7fed9d"); }
public void disassociateRouteTableNotFound() throws Exception { enqueueRegions(DEFAULT_REGION); enqueue(DEFAULT_REGION, new MockResponse().setResponseCode(404)); final boolean result = routeTableApi().disassociateRouteTable(DEFAULT_REGION, "rtbassoc-fb7fed9d"); assertFalse(result, "Non-existent table reported as successfully disassociated"); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DisassociateRouteTable&AssociationId=rtbassoc-fb7fed9d"); }
public void disassociateRouteTablewithOptions() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(PRECONDITION_FAILED, DEFAULT_REGION, "/dry_run.xml"); try { routeTableApi().disassociateRouteTable(DEFAULT_REGION, "rtbassoc-fb7fed9d", dryRun()); } catch (AWSResponseException e) { assertDryRun(e); } assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DisassociateRouteTable&AssociationId=rtbassoc-fb7fed9d&DryRun=true"); }