Add test delete_bgpvpn_as_non_admin_fail
The admin creates a bgpvpn resource by specifying a normal user tenant id. Test checks this user fails to delete the bgpvpn resource. Change-Id: I2d3f91b9d7ab86187e842f6dbecfa51ef9afbe8e Partial-Bug: #1607664
This commit is contained in:
1 changed files with 7 additions and 0 deletions
@@ -37,3 +37,10 @@ class BgpvpnTest(base):
def test_create_bgpvpn_as_non_admin_fail(self):
self.assertRaises(exceptions.Forbidden,
self.create_bgpvpn, self.bgpvpn_client)
@test.attr(type=['negative'])
def test_delete_bgpvpn_as_non_admin_fail(self):
bgpvpn = self.create_bgpvpn(self.bgpvpn_admin_client,
tenant_id=self.bgpvpn_client.tenant_id)
self.assertRaises(exceptions.NotFound,
self.bgpvpn_client.delete_bgpvpn, bgpvpn['id'])
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.