Added test - create node group template with hard coded parameters (draft)

This commit is contained in:
Sergey Galkin 2013-09-10 18:44:59 +04:00
parent 57e31d0e6a
commit c2258c8c67
4 changed files with 86 additions and 11 deletions

View File

@ -596,10 +596,67 @@ class SanityChecksTest(OfficialClientTest):
networks = client.networks.list()
return networks
def _create_node_group_template_and_get_id(
self, client, name, plugin_name,
hadoop_version, description,
volumes_per_node, volume_size,
node_processes, node_configs):
data = client.node_group_templates.create(
name, plugin_name, hadoop_version, '42', description,
volumes_per_node, volume_size, node_processes, node_configs
)
node_group_template_id = str(data.id)
return node_group_template_id
def _create_node_group_template_tt_dn_id(self, client):
node_group_template_tt_dn_id = \
self._create_node_group_template_and_get_id(
client,
'tt-dn',
'vanilla',
'1.1.2',
description='test node group template',
volumes_per_node=0,
volume_size=1,
node_processes=['tasktracker', 'datanode'],
node_configs={
#'HDFS': hc.DN_CONFIG,
#'MapReduce': '515'
}
)
return node_group_template_tt_dn_id
def _create_node_group_template_tt_id(self, client):
node_group_template_tt_id = \
self._create_node_group_template_and_get_id(
client,
'tt',
'vanilla',
'1.1.2',
description='test node group template',
volumes_per_node=0,
volume_size=0,
node_processes=['tasktracker'],
node_configs={
#'MapReduce': hc.TT_CONFIG
}
)
return node_group_template_tt_id
def _list_cluster_templates(self, client):
cluster_templates = client.cluster_templates.list()
return cluster_templates
def _create_cluster_templates(self, client):
cluster_templates = client.cluster_templates.create('name', 'vanilla',
'1.1.2', 'descr',
cluster_configs,
node_groups,
anti_affinity)
return cluster_templates
class SmokeChecksTest(OfficialClientTest):
"""

View File

@ -29,9 +29,7 @@ class SanitySavannaTests(nmanager.SanityChecksTest):
@attr(type=['sanity', 'fuel'])
def test_list_cluster_templates(self):
"""Test checks cluster template creation with
configuration | JT + NN | TT + DN |.
Test checks that the list of instances is available.
"""Test cluster template listing
Target component: Savanna
Scenario:
1. Request the list of cluster templates.
@ -44,4 +42,25 @@ class SanitySavannaTests(nmanager.SanityChecksTest):
"cluster template listing",
self.savanna_client)
@attr(type=['sanity', 'fuel'])
def test_create_node_group_template(self):
"""Test create node group template
Target component: Savanna
Scenario:
1. Create node group template tt dn
2. Create node group template tt
Duration: 20 s.
"""
fail_msg = 'Fail create node group template'
create_nodes_templates_tt_dn_resp = self.verify(
20,
self._create_node_group_template_tt_dn_id,
1, fail_msg,
"Create node group template",
self.savanna_client)
create_nodes_templates_tt_resp = self.verify(
20,
self._create_node_group_template_tt_id,
2, fail_msg,
"Create node group template",
self.savanna_client)

View File

@ -25,6 +25,7 @@ python-mimeparse==0.1.4
python-novaclient==2.13.0
python-neutronclient>=2.2
requests==1.2.3
http://tarballs.openstack.org/python-savannaclient/python-savannaclient-master.tar.gz
setuptools-git==1.0
simplejson==3.3.0
six==1.3.0

View File

@ -1,7 +1,5 @@
import setuptools
requirements = [
requirements=[
'argparse==1.2.1',
'cliff==1.4',
'cmd2==0.6.5.1',
@ -17,7 +15,7 @@ requirements = [
'nose==1.3.0',
'oslo.config==1.1.1',
'paramiko==1.10.1',
'pbr==0.5.17',
#'pbr==0.5.21',
'pika==0.9.13',
'prettytable==0.7.2',
'pyOpenSSL==0.13',
@ -37,12 +35,12 @@ requirements = [
'testresources==0.2.7',
'warlock==1.0.1',
'wsgiref==0.1.2',
'yaml==3.10'
]
'savannaclient==0.1',
],
setuptools.setup(
dependency_links=['http://tarballs.openstack.org/python-savannaclient/python-savannaclient-master.tar.gz#egg=savannaclient-0.1',],
name='ostf_tests',
version='0.1',