Add test for DNS check OSTF-116-135
Change-Id: I9e00e9cb25f8a026881a3b706709d83f650723d1
This commit is contained in:
parent
23fb505d70
commit
8ceb6f0085
|
@ -2,7 +2,7 @@
|
|||
# This section contains configuration options that a variety of
|
||||
# test clients use when authenticating with different user/tenant
|
||||
# combinations
|
||||
url = http://192.168.56.102/
|
||||
url = http://172.18.164.38/
|
||||
# The type of endpoint for a Identity service. Unless you have a
|
||||
# custom Keystone service catalog implementation, you probably want to leave
|
||||
# this value as "identity"
|
||||
|
@ -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,19 @@ 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 = 10.0.0.101
|
||||
controller_node_name = fuel-controller-01.localdomain.
|
||||
|
||||
#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 +199,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
|
||||
|
|
|
@ -187,10 +187,13 @@ ComputeGroup = [
|
|||
cfg.StrOpt('controller_node',
|
||||
default='127.0.0.1',
|
||||
help="IP address of one of the controller nodes"),
|
||||
cfg.StrOpt('controller_node_name',
|
||||
default='',
|
||||
help="DNS name 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',
|
||||
cfg.StrOpt('controller_node_ssh_password',
|
||||
default='pass',
|
||||
help="ssh user pass of one of the controller nodes"),
|
||||
|
||||
|
|
|
@ -6,15 +6,35 @@ from fuel.tests.sanity import base
|
|||
class SanityInfrastructureTest(base.BaseComputeAdminTest):
|
||||
_interface = 'json'
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.list_of_expected_services = cls.config.compute.enabled_services
|
||||
cls.host = cls.config.compute.controller_node
|
||||
cls.usr = cls.config.compute.controller_node_ssh_user
|
||||
cls.pwd = cls.config.compute.controller_node_ssh_password
|
||||
cls.hostname = cls.config.compute.controller_node_name
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
pass
|
||||
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_services_state(self):
|
||||
list_of_expected_services = self.config.compute.enabled_services
|
||||
host = self.config.compute.controller_node
|
||||
usr = self.config.compute.controller_node_ssh_user
|
||||
pwd = self.config.compute.controller_node_ssh_password
|
||||
output = SSHClient(host, usr, pwd).exec_command(
|
||||
output = SSHClient(self.host, self.usr, self.pwd).exec_command(
|
||||
"nova-manage service list")
|
||||
self.assertFalse(u'XXX' in output)
|
||||
self.assertEqual(len(list_of_expected_services),
|
||||
self.assertEqual(len(self.list_of_expected_services),
|
||||
output.count(u':-)'),
|
||||
'Not all the expected services started')
|
||||
|
||||
@attr(type=['sanity', 'fuel'])
|
||||
def test_dns_state(self):
|
||||
output = ''
|
||||
try:
|
||||
output = SSHClient(self.host, self.usr, self.pwd).exec_command(
|
||||
"host " + self.host)
|
||||
finally:
|
||||
expected_output = 'in-addr.arpa domain name pointer ' + \
|
||||
self.hostname
|
||||
self.assertTrue(expected_output in output,
|
||||
'DNS name cannot be resolved')
|
||||
|
|
Loading…
Reference in New Issue