~openstack-charm-sync/charms/trusty/neutron-gateway/stable

« back to all changes in this revision

Viewing changes to tests/basic_deployment.py

  • Committer: Liam Young
  • Date: 2015-10-19 12:05:39 UTC
  • mfrom: (151.1.4 stable.remote)
  • Revision ID: liam.young@canonical.com-20151019120539-qgbjl1daa2bsp5ei
[gnuoy, r=james-page] Set os release on configs after upgrade to ensure the correct templates are used. Fix unrelated amulet test

Show diffs side-by-side

added added

removed removed

Lines of Context:
421
421
        expected = {
422
422
            'db_host': u.valid_ip,
423
423
            'private-address': u.valid_ip,
424
 
            'password': u.not_null
 
424
            'password': u.not_null,
 
425
            'allowed_units': u.not_null,
425
426
        }
426
427
 
427
 
        if self._get_openstack_release() == self.precise_icehouse:
428
 
            # Precise
429
 
            expected['allowed_units'] = 'nova-cloud-controller/0 neutron-api/0'
430
 
        else:
431
 
            # Not Precise
432
 
            expected['allowed_units'] = 'neutron-api/0'
433
 
 
434
428
        ret = u.validate_relation_data(unit, relation, expected)
435
429
        if ret:
436
430
            message = u.relation_error('mysql shared-db', ret)
437
431
            amulet.raise_status(amulet.FAIL, msg=message)
 
432
        relation_data = unit.relation(relation[0], relation[1])
 
433
        allowed_units = relation_data['allowed_units'].split()
 
434
        if 'neutron-api/0' not in allowed_units:
 
435
            message = 'neutron-api/0 not found in allowed_units'
 
436
            amulet.raise_status(amulet.FAIL, msg=message)
438
437
 
439
438
    def test_208_neutron_api_amqp_relation(self):
440
439
        """Verify the neutron-api to rabbitmq-server amqp relation data"""