Major change New infrastructure test adds to Sanity Test Set.
* etc/test.conf was updated with new params specifies controller node and ssh user can connect there. Also all the IP's were updated to use on our test lab master node. * fuel/sanity/config.py was updated to support new paras mentioned above. * fuel/sanity/test_sanity_infrastructure.py file contains all the services are up has been added. * All the sanity tests in fuel/sanity/test_sanity_* files were updated with additional attribute fuel. * sanity tests were moved to tests/sanity directory Change-Id: I9201e91f3a0f95197b7b9f9e52304a2c1698072f
This commit is contained in:
parent
b0b53cb2b6
commit
ebe384d586
|
@ -11,7 +11,7 @@ catalog_type = identity
|
|||
# environments that have self-signed SSL certs.
|
||||
disable_ssl_certificate_validation = False
|
||||
# URL for where to find the OpenStack Identity API endpoint (Keystone)
|
||||
uri = http://172.18.194.41:5000/v2.0/
|
||||
uri = http://172.18.164.38:5000/v2.0/
|
||||
# URL for where to find the OpenStack V3 Identity API endpoint (Keystone)
|
||||
#uri_v3 = http://127.0.0.1:5000/v3/
|
||||
# Should typically be left as keystone unless you have a non-Keystone
|
||||
|
@ -46,6 +46,18 @@ admin_tenant_name = admin
|
|||
# This section contains configuration options used when executing tests
|
||||
# against the OpenStack Compute API.
|
||||
|
||||
#One of the controller nodes
|
||||
controller_node = 172.18.164.38
|
||||
|
||||
#Controller node user who able connect via ssh
|
||||
controller_node_ssh_user = root
|
||||
|
||||
#Controller node ssh user's password
|
||||
controller_node_ssh_password = r00tme
|
||||
|
||||
#The list of the services should be enabled
|
||||
enabled_services=nova-cert, nova-consoleauth, nova-scheduler, nova-conductor, nova-compute, nova-compute
|
||||
|
||||
# Allows test cases to create/destroy tenants and users. This option
|
||||
# enables isolated test cases and better parallel execution,
|
||||
# but also requires that OpenStack Identity API admin credentials
|
||||
|
@ -186,7 +198,7 @@ public_network_id =
|
|||
public_router_id =
|
||||
|
||||
# Whether or not quantum is expected to be available
|
||||
quantum_available = false
|
||||
quantum_available = true
|
||||
|
||||
[volume]
|
||||
# This section contains the configuration options used when executing tests
|
||||
|
|
|
@ -180,6 +180,20 @@ ComputeGroup = [
|
|||
default=True,
|
||||
help="If false, skip config tests regardless of the "
|
||||
"extension status"),
|
||||
cfg.ListOpt('enabled_services',
|
||||
default=[],
|
||||
help="If false, skip config tests regardless of the "
|
||||
"extension status"),
|
||||
cfg.StrOpt('controller_node',
|
||||
default='127.0.0.1',
|
||||
help="IP address of one of the controller nodes"),
|
||||
cfg.StrOpt('controller_node_ssh_user',
|
||||
default='ssh_user',
|
||||
help="ssh user of one of the controller nodes"),
|
||||
cfg.StrOpt('controller_node_ssh_password',
|
||||
default='pass',
|
||||
help="ssh user pass of one of the controller nodes"),
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ import time
|
|||
from fuel import clients
|
||||
from fuel.common.utils.data_utils import rand_name
|
||||
import fuel.test
|
||||
from fuel import sanity
|
||||
from fuel.common import log as logging
|
||||
from fuel import exceptions
|
||||
from fuel.tests import sanity
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -1,42 +1,41 @@
|
|||
|
||||
from fuel.sanity import base
|
||||
from fuel.test import attr
|
||||
from fuel.tests.sanity import base
|
||||
|
||||
|
||||
class SanityComputeTest(base.BaseComputeTest):
|
||||
_interface = 'json'
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_instances(self):
|
||||
resp, body = self.servers_client.list_servers()
|
||||
self.assertEqual(200, resp.status)
|
||||
self.assertTrue(u'servers' in body)
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_images(self):
|
||||
resp, body = self.images_client.list_images()
|
||||
self.assertEqual(200, resp.status)
|
||||
self.assertTrue(u'images' in body)
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_volumes(self):
|
||||
resp, body = self.volumes_client.list_volumes()
|
||||
self.assertEqual(200, resp.status)
|
||||
self.assertTrue(u'volumes' in body)
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_snapshots(self):
|
||||
resp, body = self.snapshots_client.list_snapshots()
|
||||
self.assertEqual(200, resp.status)
|
||||
self.assertTrue(u'snapshots' in body)
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_flavors(self):
|
||||
resp, body = self.flavors_client.list_flavors()
|
||||
self.assertEqual(200, resp.status)
|
||||
self.assertTrue(u'flavors' in body)
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_rate_limits(self):
|
||||
resp, body = self.limits_client.get_absolute_limits()
|
||||
self.assertEqual(200, resp.status)
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
|
||||
from fuel.sanity import base
|
||||
from fuel.tests.sanity import base
|
||||
from fuel.test import attr
|
||||
|
||||
|
||||
class ServicesTestJSON(base.BaseIdentityAdminTest):
|
||||
_interface = 'json'
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_services(self):
|
||||
# List and Verify Services
|
||||
resp, body = self.client.list_services()
|
||||
self.assertEqual(200, resp.status)
|
||||
self.assertTrue(u'OS-KSADM:services' in body)
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_users(self):
|
||||
# List users
|
||||
resp, body = self.client.get_users()
|
||||
self.assertEqual(200, resp.status)
|
||||
self.assertTrue(u'users' in body)
|
||||
|
||||
self.assertTrue(u'users' in body)
|
|
@ -0,0 +1,34 @@
|
|||
import paramiko
|
||||
from fuel.test import attr
|
||||
from fuel.tests.sanity import base
|
||||
|
||||
|
||||
class SanityInfrastructureTest(base.BaseComputeAdminTest):
|
||||
_interface = 'json'
|
||||
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_services_state(self):
|
||||
list_of_expected_services = self.config.compute.enabled_services
|
||||
hostname = self.config.compute.controller_node
|
||||
port = 22
|
||||
username = self.config.compute.controller_node_ssh_user
|
||||
password = self.config.compute.controller_node_ssh_password
|
||||
sshClient = paramiko.SSHClient()
|
||||
sshClient.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
try:
|
||||
sshClient.connect(hostname, port, username, password)
|
||||
_, out, err = sshClient.exec_command("nova-manage service list")
|
||||
out = out.readlines()
|
||||
err = err.readlines()
|
||||
except BaseException:
|
||||
raise
|
||||
finally:
|
||||
sshClient.close()
|
||||
self.assertEqual("[]",
|
||||
str(err),
|
||||
("nova-manage service list command has "
|
||||
"finished with the following error %s") % err)
|
||||
self.assertFalse(u'XXX' in out)
|
||||
self.assertEqual(len(list_of_expected_services),
|
||||
str(out).count(u':-)'),
|
||||
'Not all the expected services started')
|
|
@ -1,17 +1,15 @@
|
|||
|
||||
from fuel.sanity import base
|
||||
from fuel.test import attr
|
||||
from fuel.tests.sanity import base
|
||||
|
||||
|
||||
class NetworksTest(base.BaseNetworkTest):
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_networks(self):
|
||||
resp, body = self.client.list_networks()
|
||||
self.assertEqual(200, resp.status)
|
||||
self.assertTrue(u'networks' in body)
|
||||
|
||||
|
||||
@attr(type='sanity')
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_list_ports(self):
|
||||
resp, body = self.client.list_ports()
|
||||
self.assertEqual(200, resp.status)
|
||||
|
|
Loading…
Reference in New Issue