Merge "Add a functional test option to skip notification tests"
diff --git a/common/config.py b/common/config.py
index fd44075..5a33590 100644
--- a/common/config.py
+++ b/common/config.py
@@ -27,7 +27,8 @@
help="API key to use when authenticating.",
secret=True),
cfg.StrOpt('tenant_name',
- default=os.environ.get('OS_TENANT_NAME'),
+ default=(os.environ.get('OS_PROJECT_NAME') or
+ os.environ.get('OS_TENANT_NAME')),
help="Tenant name to use for API requests."),
cfg.StrOpt('auth_url',
default=os.environ.get('OS_AUTH_URL'),
diff --git a/scenario/templates/test_server_cfn_init.yaml b/scenario/templates/test_server_cfn_init.yaml
index ffb8e9b..9f94717 100644
--- a/scenario/templates/test_server_cfn_init.yaml
+++ b/scenario/templates/test_server_cfn_init.yaml
@@ -28,10 +28,16 @@
Properties:
UserName: {Ref: CfnUser}
- IPAddress:
+ ElasticIp:
Type: AWS::EC2::EIP
Properties:
- InstanceId: {Ref: SmokeServer}
+ Domain: vpc
+
+ SmokeServerElasticIp:
+ Type: AWS::EC2::EIPAssociation
+ Properties:
+ EIP: {Ref: ElasticIp}
+ InstanceId: {Ref: SmokeServer}
SmokeServer:
Type: AWS::EC2::Instance
@@ -81,7 +87,11 @@
Description: Contents of /tmp/smoke-status on SmokeServer
Value:
Fn::GetAtt: [WaitCondition, Data]
- SmokeServerIp:
- Description: IP address of server
+ ElasticIp_Id:
+ Description: Elastic ip allocation id
Value:
- Ref: IPAddress
+ Fn::GetAtt: [ElasticIp, AllocationId]
+ SmokeServerElasticIp:
+ Description: Elastic ip address of server
+ Value:
+ Ref: ElasticIp
diff --git a/scenario/test_neutron_autoscaling.py b/scenario/test_neutron_autoscaling.py
index e7aae19..c81e22d 100644
--- a/scenario/test_neutron_autoscaling.py
+++ b/scenario/test_neutron_autoscaling.py
@@ -20,6 +20,7 @@
def setUp(self):
super(NeutronAutoscalingTest, self).setUp()
+ raise self.skipException("Skipping until bug #1479869 is fixed.")
if not self.conf.fixed_subnet_name:
raise self.skipException("No sub-network configured to test")
self.template_name = 'test_neutron_autoscaling.yaml'
diff --git a/scenario/test_neutron_loadbalancer.py b/scenario/test_neutron_loadbalancer.py
index d8e0197..a890257 100644
--- a/scenario/test_neutron_loadbalancer.py
+++ b/scenario/test_neutron_loadbalancer.py
@@ -25,6 +25,7 @@
def setUp(self):
super(NeutronLoadBalancerTest, self).setUp()
+ raise self.skipException("Skipping until bug #1479869 is fixed.")
self.public_net = self._get_network(self.conf.floating_network_name)
self.template_name = 'test_neutron_loadbalancer.yaml'
diff --git a/scenario/test_server_cfn_init.py b/scenario/test_server_cfn_init.py
index b5b1e67..197e0c0 100644
--- a/scenario/test_server_cfn_init.py
+++ b/scenario/test_server_cfn_init.py
@@ -23,11 +23,12 @@
def setUp(self):
super(CfnInitIntegrationTest, self).setUp()
+ raise self.skipException("Skipping until bug #1479869 is fixed.")
def check_stack(self, sid):
# Check status of all resources
for res in ('WaitHandle', 'SmokeSecurityGroup', 'SmokeKeys',
- 'CfnUser', 'SmokeServer', 'IPAddress'):
+ 'CfnUser', 'SmokeServer', 'SmokeServerElasticIp'):
self._wait_for_resource_status(
sid, res, 'CREATE_COMPLETE')
@@ -59,7 +60,22 @@
self._stack_output(stack, 'WaitConditionStatus'))
self.assertEqual('smoke test complete', wait_status['smoke_status'])
- server_ip = self._stack_output(stack, 'SmokeServerIp')
+ # Check EIP attributes.
+ server_floatingip_id = self._stack_output(stack,
+ 'ElasticIp_Id')
+ self.assertIsNotNone(server_floatingip_id)
+
+ # Fetch EIP details.
+ net_show = self.network_client.show_floatingip(
+ floatingip=server_floatingip_id)
+ floating_ip = net_show['floatingip']['floating_ip_address']
+ port_id = net_show['floatingip']['port_id']
+
+ # Ensure that EIP was assigned to server.
+ port_show = self.network_client.show_port(port=port_id)
+ self.assertEqual(server.id, port_show['port']['device_id'])
+ server_ip = self._stack_output(stack, 'SmokeServerElasticIp')
+ self.assertEqual(server_ip, floating_ip)
# Check that created server is reachable
if not self._ping_ip_address(server_ip):