Add test to check error message for category-create with long category name

Test case checks that error message after calling category-create with
long category name (longer than 80 characters)contains user friendly substring

Targets: blueprint murano-cli-integration-test-coverage

Change-Id: Id6c211b058b3b39320e613968bd04447389f2744
This commit is contained in:
Tatyana Kuterina 2016-02-26 11:12:22 +03:00
parent 41420785ef
commit 445a430093
1 changed files with 11 additions and 0 deletions

View File

@ -286,6 +286,17 @@ class CategoryMuranoSanityClientTest(utils.CLIUtilsTestBase):
fail_ok=True)
self.assertIn("Category id 'non-existing' not found", result)
def test_category_create_with_long_name(self):
"""Test scenario:
1) try to create category with long name (>80)
2) check that error message contains user friendly substring
"""
result = self.murano('category-create', params='name' * 21,
fail_ok=True)
self.assertIn(
"Category name should be 80 characters maximum (HTTP 400)",
result)
class EnvTemplateMuranoSanityClientTest(utils.CLIUtilsTestBase):
"""Sanity tests for testing actions with Environment template.