Chain up to superclass tearDown in ServerActionsTest
I noticed that HostTestCase was failing if run on its own because allow_admin_api wasn't set - it worked fine when the full suite was run because the flag was being leaked from ServerActionsTest. Change-Id: I9072f84f017125536d1f261165c44413964f5708
This commit is contained in:
parent
0b831e0fc6
commit
1c0bfe72cc
|
@ -94,14 +94,17 @@ class HostTestCase(test.TestCase):
|
|||
self.assertEqual(result_c2["status"], "disabled")
|
||||
|
||||
def test_host_startup(self):
|
||||
self.flags(allow_admin_api=True)
|
||||
result = self.controller.startup(self.req, "host_c1")
|
||||
self.assertEqual(result["power_action"], "startup")
|
||||
|
||||
def test_host_shutdown(self):
|
||||
self.flags(allow_admin_api=True)
|
||||
result = self.controller.shutdown(self.req, "host_c1")
|
||||
self.assertEqual(result["power_action"], "shutdown")
|
||||
|
||||
def test_host_reboot(self):
|
||||
self.flags(allow_admin_api=True)
|
||||
result = self.controller.reboot(self.req, "host_c1")
|
||||
self.assertEqual(result["power_action"], "reboot")
|
||||
|
||||
|
|
Loading…
Reference in New Issue