public void getInternetGatewayNotFound() throws Exception { enqueueRegions(DEFAULT_REGION); enqueue(DEFAULT_REGION, new MockResponse().setResponseCode(404)); final String igwId = "igw-fada7c9c"; final FluentIterable<InternetGateway> internetGateways = gatewayApi().describeInternetGatewaysInRegion(DEFAULT_REGION, igwId); final ImmutableList<InternetGateway> gateways = internetGateways.toList(); assertEquals(gateways.size(), 0); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeInternetGateways&InternetGatewayId.1=igw-fada7c9c"); }
public void attachInternetGatewayNotFound() throws Exception { enqueueRegions(DEFAULT_REGION); enqueue(DEFAULT_REGION, new MockResponse().setResponseCode(404)); final Boolean attached = gatewayApi().attachInternetGateway(DEFAULT_REGION, "igw-fada7c9c", "vpc-6250b91b"); assertFalse(attached, "Somehow attached gateway despite NotFound response"); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=AttachInternetGateway&InternetGatewayId=igw-fada7c9c&VpcId=vpc-6250b91b"); }
public void detachInternetGatewayNotFound() throws Exception { enqueueRegions(DEFAULT_REGION); enqueue(DEFAULT_REGION, new MockResponse().setResponseCode(404)); final Boolean detached = gatewayApi().detachInternetGateway(DEFAULT_REGION, "igw-fada7c9c", "vpc-6250b91b"); assertFalse(detached, "Non-existent gateway somehow successfully detached"); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DetachInternetGateway&InternetGatewayId=igw-fada7c9c&VpcId=vpc-6250b91b"); }
public void deleteInternetGatewayNotFound() throws Exception { enqueueRegions(DEFAULT_REGION); enqueue(DEFAULT_REGION, new MockResponse().setResponseCode(404)); final boolean deleted = gatewayApi().deleteInternetGateway(DEFAULT_REGION, "igw-fada7c9c"); assertFalse(deleted, "Somehow deleted a gateway that does not exist"); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DeleteInternetGateway&InternetGatewayId=igw-fada7c9c"); }