]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add test for security groups
authorAnn Kamyshnikova <akamyshnikova@mirantis.com>
Thu, 30 Apr 2015 12:42:06 +0000 (15:42 +0300)
committerAnn Kamyshnikova <akamyshnikova@mirantis.com>
Tue, 5 May 2015 10:47:41 +0000 (13:47 +0300)
Add test that default security group name can not be updated.

Change-Id: Iff0a920122be8e19a1e1d92db33519f372a8b9b2

neutron/tests/api/test_security_groups_negative.py

index b45c11db02f3f637aa204bc7d08ab41c621ce2b6..347b18be17e8f7f33e3a487ea0bec6174bb31d60 100644 (file)
@@ -202,6 +202,14 @@ class NegativeSecGroupTest(base.BaseSecGroupTest):
                           security_group_id=non_existent_sg,
                           direction='ingress', ethertype=self.ethertype)
 
+    @test.attr(type=['negative', 'smoke'])
+    @test.idempotent_id('55100aa8-b24f-333c-0bef-64eefd85f15c')
+    def test_update_default_security_group_name(self):
+        sg_list = self.client.list_security_groups(name='default')
+        sg = sg_list['security_groups'][0]
+        self.assertRaises(lib_exc.Conflict, self.client.update_security_group,
+                          sg['id'], name='test')
+
 
 class NegativeSecGroupIPv6Test(NegativeSecGroupTest):
     _ip_version = 6