From 137b619591eb36f0320dff60ddf4d09fd9eb04aa Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Fri, 13 Nov 2015 12:40:28 +0000 Subject: [PATCH] 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 --- tempest/api/identity/admin/v3/test_domains_negative.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tempest/api/identity/admin/v3/test_domains_negative.py b/tempest/api/identity/admin/v3/test_domains_negative.py index 33819a8b6b..910fe5fed6 100644 --- a/tempest/api/identity/admin/v3/test_domains_negative.py +++ b/tempest/api/identity/admin/v3/test_domains_negative.py @@ -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)