List dependencies for services - add integration test to verify
This commit is contained in:
parent
9f0f230d13
commit
db1d7123f6
41 changed files with 1405 additions and 1245 deletions
|
|
@ -7,15 +7,12 @@ from nose.tools import assert_raises
|
|||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
import boto
|
||||
import boto.cloudformation
|
||||
import boto.ec2
|
||||
from boto.exception import EC2ResponseError
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_ec2, mock_cloudformation_deprecated, mock_ec2_deprecated
|
||||
from moto import mock_ec2, mock_ec2_deprecated
|
||||
from tests.helpers import requires_boto_gte
|
||||
from tests.test_cloudformation.fixtures import vpc_eni
|
||||
import json
|
||||
|
||||
|
||||
@mock_ec2_deprecated
|
||||
|
|
@ -501,27 +498,3 @@ def test_elastic_network_interfaces_describe_network_interfaces_with_filter():
|
|||
eni1.private_ip_address
|
||||
)
|
||||
response["NetworkInterfaces"][0]["Description"].should.equal(eni1.description)
|
||||
|
||||
|
||||
@mock_ec2_deprecated
|
||||
@mock_cloudformation_deprecated
|
||||
def test_elastic_network_interfaces_cloudformation():
|
||||
template = vpc_eni.template
|
||||
template_json = json.dumps(template)
|
||||
conn = boto.cloudformation.connect_to_region("us-west-1")
|
||||
conn.create_stack("test_stack", template_body=template_json)
|
||||
ec2_conn = boto.ec2.connect_to_region("us-west-1")
|
||||
eni = ec2_conn.get_all_network_interfaces()[0]
|
||||
eni.private_ip_addresses.should.have.length_of(1)
|
||||
|
||||
stack = conn.describe_stacks()[0]
|
||||
resources = stack.describe_resources()
|
||||
cfn_eni = [
|
||||
resource
|
||||
for resource in resources
|
||||
if resource.resource_type == "AWS::EC2::NetworkInterface"
|
||||
][0]
|
||||
cfn_eni.physical_resource_id.should.equal(eni.id)
|
||||
|
||||
outputs = {output.key: output.value for output in stack.outputs}
|
||||
outputs["ENIIpAddress"].should.equal(eni.private_ip_addresses[0].private_ip_address)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue