Fix AvailibilityZones in CF tests
This commit is contained in:
parent
8475804a8b
commit
414fcf7bbd
@ -495,7 +495,7 @@ def test_autoscaling_group_with_elb():
|
|||||||
"my-as-group": {
|
"my-as-group": {
|
||||||
"Type": "AWS::AutoScaling::AutoScalingGroup",
|
"Type": "AWS::AutoScaling::AutoScalingGroup",
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"AvailabilityZones": ["us-east1"],
|
"AvailabilityZones": ["us-east-1a"],
|
||||||
"LaunchConfigurationName": {"Ref": "my-launch-config"},
|
"LaunchConfigurationName": {"Ref": "my-launch-config"},
|
||||||
"MinSize": "2",
|
"MinSize": "2",
|
||||||
"MaxSize": "2",
|
"MaxSize": "2",
|
||||||
@ -522,7 +522,7 @@ def test_autoscaling_group_with_elb():
|
|||||||
"my-elb": {
|
"my-elb": {
|
||||||
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
|
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"AvailabilityZones": ["us-east1"],
|
"AvailabilityZones": ["us-east-1a"],
|
||||||
"Listeners": [
|
"Listeners": [
|
||||||
{
|
{
|
||||||
"LoadBalancerPort": "80",
|
"LoadBalancerPort": "80",
|
||||||
@ -545,10 +545,10 @@ def test_autoscaling_group_with_elb():
|
|||||||
|
|
||||||
web_setup_template_json = json.dumps(web_setup_template)
|
web_setup_template_json = json.dumps(web_setup_template)
|
||||||
|
|
||||||
conn = boto.cloudformation.connect_to_region("us-west-1")
|
conn = boto.cloudformation.connect_to_region("us-east-1")
|
||||||
conn.create_stack("web_stack", template_body=web_setup_template_json)
|
conn.create_stack("web_stack", template_body=web_setup_template_json)
|
||||||
|
|
||||||
autoscale_conn = boto.ec2.autoscale.connect_to_region("us-west-1")
|
autoscale_conn = boto.ec2.autoscale.connect_to_region("us-east-1")
|
||||||
autoscale_group = autoscale_conn.get_all_groups()[0]
|
autoscale_group = autoscale_conn.get_all_groups()[0]
|
||||||
autoscale_group.launch_config_name.should.contain("my-launch-config")
|
autoscale_group.launch_config_name.should.contain("my-launch-config")
|
||||||
autoscale_group.load_balancers[0].should.equal("my-elb")
|
autoscale_group.load_balancers[0].should.equal("my-elb")
|
||||||
@ -557,7 +557,7 @@ def test_autoscaling_group_with_elb():
|
|||||||
autoscale_conn.get_all_launch_configurations().should.have.length_of(1)
|
autoscale_conn.get_all_launch_configurations().should.have.length_of(1)
|
||||||
|
|
||||||
# Confirm the ELB was actually created
|
# Confirm the ELB was actually created
|
||||||
elb_conn = boto.ec2.elb.connect_to_region("us-west-1")
|
elb_conn = boto.ec2.elb.connect_to_region("us-east-1")
|
||||||
elb_conn.get_all_load_balancers().should.have.length_of(1)
|
elb_conn.get_all_load_balancers().should.have.length_of(1)
|
||||||
|
|
||||||
stack = conn.describe_stacks()[0]
|
stack = conn.describe_stacks()[0]
|
||||||
@ -584,7 +584,7 @@ def test_autoscaling_group_with_elb():
|
|||||||
elb_resource.physical_resource_id.should.contain("my-elb")
|
elb_resource.physical_resource_id.should.contain("my-elb")
|
||||||
|
|
||||||
# confirm the instances were created with the right tags
|
# confirm the instances were created with the right tags
|
||||||
ec2_conn = boto.ec2.connect_to_region("us-west-1")
|
ec2_conn = boto.ec2.connect_to_region("us-east-1")
|
||||||
reservations = ec2_conn.get_all_reservations()
|
reservations = ec2_conn.get_all_reservations()
|
||||||
len(reservations).should.equal(1)
|
len(reservations).should.equal(1)
|
||||||
reservation = reservations[0]
|
reservation = reservations[0]
|
||||||
@ -604,7 +604,7 @@ def test_autoscaling_group_update():
|
|||||||
"my-as-group": {
|
"my-as-group": {
|
||||||
"Type": "AWS::AutoScaling::AutoScalingGroup",
|
"Type": "AWS::AutoScaling::AutoScalingGroup",
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"AvailabilityZones": ["us-west-1"],
|
"AvailabilityZones": ["us-west-1a"],
|
||||||
"LaunchConfigurationName": {"Ref": "my-launch-config"},
|
"LaunchConfigurationName": {"Ref": "my-launch-config"},
|
||||||
"MinSize": "2",
|
"MinSize": "2",
|
||||||
"MaxSize": "2",
|
"MaxSize": "2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user