Merge "Make testing neutron agents optional"

This commit is contained in:
Jenkins 2014-01-07 07:55:37 +00:00 committed by Gerrit Code Review
commit cb597066ea
3 changed files with 27 additions and 19 deletions

View File

@ -17,7 +17,7 @@
from tempest.api.network import base
from tempest.common.utils import data_utils
from tempest.test import attr
from tempest import test
class LoadBalancerJSON(base.BaseNetworkTest):
@ -42,6 +42,9 @@ class LoadBalancerJSON(base.BaseNetworkTest):
@classmethod
def setUpClass(cls):
super(LoadBalancerJSON, cls).setUpClass()
if not test.is_extension_enabled('lbaas', 'network'):
msg = "lbaas extension not enabled."
raise cls.skipException(msg)
cls.network = cls.create_network()
cls.name = cls.network['name']
cls.subnet = cls.create_subnet(cls.network)
@ -53,7 +56,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
cls.member = cls.create_member(80, cls.pool)
cls.health_monitor = cls.create_health_monitor(4, 3, "TCP", 1)
@attr(type='smoke')
@test.attr(type='smoke')
def test_list_vips(self):
# Verify the vIP exists in the list of all vIPs
resp, body = self.client.list_vips()
@ -100,7 +103,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
resp, body = self.client.delete_pool(pool['id'])
self.assertEqual('204', resp['status'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_show_vip(self):
# Verifies the details of a vip
resp, body = self.client.show_vip(self.vip['id'])
@ -109,7 +112,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
self.assertEqual(self.vip['id'], vip['id'])
self.assertEqual(self.vip['name'], vip['name'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_show_pool(self):
# Verifies the details of a pool
resp, body = self.client.show_pool(self.pool['id'])
@ -118,7 +121,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
self.assertEqual(self.pool['id'], pool['id'])
self.assertEqual(self.pool['name'], pool['name'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_list_pools(self):
# Verify the pool exists in the list of all pools
resp, body = self.client.list_pools()
@ -126,7 +129,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
pools = body['pools']
self.assertIn(self.pool['id'], [p['id'] for p in pools])
@attr(type='smoke')
@test.attr(type='smoke')
def test_list_members(self):
# Verify the member exists in the list of all members
resp, body = self.client.list_members()
@ -134,7 +137,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
members = body['members']
self.assertIn(self.member['id'], [m['id'] for m in members])
@attr(type='smoke')
@test.attr(type='smoke')
def test_create_update_delete_member(self):
# Creates a member
resp, body = self.client.create_member("10.0.9.47", 80,
@ -151,7 +154,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
resp, body = self.client.delete_member(member['id'])
self.assertEqual('204', resp['status'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_show_member(self):
# Verifies the details of a member
resp, body = self.client.show_member(self.member['id'])
@ -161,7 +164,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
self.assertEqual(self.member['admin_state_up'],
member['admin_state_up'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_list_health_monitors(self):
# Verify the health monitor exists in the list of all health monitors
resp, body = self.client.list_health_monitors()
@ -170,7 +173,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
self.assertIn(self.health_monitor['id'],
[h['id'] for h in health_monitors])
@attr(type='smoke')
@test.attr(type='smoke')
def test_create_update_delete_health_monitor(self):
# Creates a health_monitor
resp, body = self.client.create_health_monitor(4, 3, "TCP", 1)
@ -187,7 +190,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
resp, body = self.client.delete_health_monitor(health_monitor['id'])
self.assertEqual('204', resp['status'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_show_health_monitor(self):
# Verifies the details of a health_monitor
resp, body = self.client.show_health_monitor(self.health_monitor['id'])
@ -197,7 +200,7 @@ class LoadBalancerJSON(base.BaseNetworkTest):
self.assertEqual(self.health_monitor['admin_state_up'],
health_monitor['admin_state_up'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_associate_disassociate_health_monitor_with_pool(self):
# Verify that a health monitor can be associated with a pool
resp, body = (self.client.associate_health_monitor_with_pool

View File

@ -17,7 +17,7 @@
from tempest.api.network import base
from tempest.common.utils import data_utils
from tempest.test import attr
from tempest import test
class VPNaaSJSON(base.BaseNetworkTest):
@ -38,6 +38,9 @@ class VPNaaSJSON(base.BaseNetworkTest):
@classmethod
def setUpClass(cls):
super(VPNaaSJSON, cls).setUpClass()
if not test.is_extension_enabled('vpnaas', 'network'):
msg = "vpnaas extension not enabled."
raise cls.skipException(msg)
cls.network = cls.create_network()
cls.subnet = cls.create_subnet(cls.network)
cls.router = cls.create_router(
@ -65,7 +68,7 @@ class VPNaaSJSON(base.BaseNetworkTest):
ike_id_list.append(i['id'])
self.assertNotIn(ike_policy_id, ike_id_list)
@attr(type='smoke')
@test.attr(type='smoke')
def test_list_vpn_services(self):
# Verify the VPN service exists in the list of all VPN services
resp, body = self.client.list_vpnservices()
@ -73,7 +76,7 @@ class VPNaaSJSON(base.BaseNetworkTest):
vpnservices = body['vpnservices']
self.assertIn(self.vpnservice['id'], [v['id'] for v in vpnservices])
@attr(type='smoke')
@test.attr(type='smoke')
def test_create_update_delete_vpn_service(self):
# Creates a VPN service
name = data_utils.rand_name('vpn-service-')
@ -102,7 +105,7 @@ class VPNaaSJSON(base.BaseNetworkTest):
vpn_services = [vs['id'] for vs in body['vpnservices']]
self.assertNotIn(vpnservice['id'], vpn_services)
@attr(type='smoke')
@test.attr(type='smoke')
def test_show_vpn_service(self):
# Verifies the details of a vpn service
resp, body = self.client.show_vpnservice(self.vpnservice['id'])
@ -116,7 +119,7 @@ class VPNaaSJSON(base.BaseNetworkTest):
self.assertEqual(self.vpnservice['subnet_id'], vpnservice['subnet_id'])
self.assertEqual(self.vpnservice['tenant_id'], vpnservice['tenant_id'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_list_ike_policies(self):
# Verify the ike policy exists in the list of all IKE policies
resp, body = self.client.list_ikepolicies()
@ -124,7 +127,7 @@ class VPNaaSJSON(base.BaseNetworkTest):
ikepolicies = body['ikepolicies']
self.assertIn(self.ikepolicy['id'], [i['id'] for i in ikepolicies])
@attr(type='smoke')
@test.attr(type='smoke')
def test_create_update_delete_ike_policy(self):
# Creates a IKE policy
name = data_utils.rand_name('ike-policy-')
@ -149,7 +152,7 @@ class VPNaaSJSON(base.BaseNetworkTest):
resp, body = self.client.delete_ikepolicy(ikepolicy['id'])
self.assertEqual('204', resp['status'])
@attr(type='smoke')
@test.attr(type='smoke')
def test_show_ike_policy(self):
# Verifies the details of a ike policy
resp, body = self.client.show_ikepolicy(self.ikepolicy['id'])

View File

@ -76,11 +76,13 @@ class SimpleReadOnlyNeutronClientTest(tempest.cli.ClientTestBase):
@test.skip_because(bug="1240694")
@test.attr(type='smoke')
@test.requires_ext(extension='metering', service='network')
def test_neutron_meter_label_list(self):
self.neutron('meter-label-list')
@test.skip_because(bug="1240694")
@test.attr(type='smoke')
@test.requires_ext(extension='metering', service='network')
def test_neutron_meter_label_rule_list(self):
self.neutron('meter-label-rule-list')