add 'create domain with name length > 64'

Add negative test 'create domain with name length > 64'
 to test_domains_negative

Change-Id: Ie8677e4cf3347779f709bee77e543895f388de0e
Partial-Bug: 1513346
This commit is contained in:
Wei Liu 2015-11-13 12:40:28 +00:00
parent a1edb75d79
commit 137b619591

View File

@ -44,3 +44,11 @@ class DomainsNegativeTestJSON(base.BaseIdentityV3AdminTest):
# Domain name should not be empty
self.assertRaises(lib_exc.BadRequest, self.client.create_domain,
name='')
@test.attr(type=['negative'])
@test.idempotent_id('37b1bbf2-d664-4785-9a11-333438586eae')
def test_create_domain_with_name_length_over_64(self):
# Domain name length should not ne greater than 64 characters
d_name = 'a' * 65
self.assertRaises(lib_exc.BadRequest, self.client.create_domain,
d_name)