Merge "Fixes issue with ng names duplicates"

This commit is contained in:
Jenkins 2013-07-24 14:03:17 +00:00 committed by Gerrit Code Review
commit ec6b14074b
2 changed files with 24 additions and 0 deletions

View File

@ -78,6 +78,7 @@ def check_all_configurations(data):
plugin_configs=pl_confs)
if data.get('node_groups'):
check_duplicates_node_groups_names(data['node_groups'])
for ng in data['node_groups']:
check_node_group_basic_fields(data['plugin_name'],
data['hadoop_version'],

View File

@ -73,6 +73,29 @@ class TestClusterTemplateCreateValidation(u.ValidationTestCase):
"'flavor_id': '42'} "
"is not valid under any of the given schemas")
)
self._assert_create_object_validation(
data={
'name': "test-name",
'plugin_name': "vanilla",
'hadoop_version': "1.1.2",
'node_groups': [
{
'name': 'a',
'flavor_id': '42',
'node_processes': ['namenode'],
'count': 1
},
{
"node_group_template_id": "550e8400-e29b-41d4-a716-"
"446655440000",
"name": "a",
'count': 2
}
]
},
bad_req_i=(1, "INVALID_REFERENCE",
"Duplicates in node group names are detected")
)
def test_cluster_template_create_v_ng_templates(self):
self._assert_create_object_validation(