Merge "Ensure server unlocking after test_lock_unlock_server"

This commit is contained in:
Jenkins 2015-08-13 15:49:09 +00:00 committed by Gerrit Code Review
commit f2dfafa453

View File

@ -474,6 +474,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
def test_lock_unlock_server(self):
# Lock the server,try server stop(exceptions throw),unlock it and retry
self.client.lock_server(self.server_id)
self.addCleanup(self.client.unlock_server, self.server_id)
server = self.client.show_server(self.server_id)
self.assertEqual(server['status'], 'ACTIVE')
# Locked server is not allowed to be stopped by non-admin user