diff options
| author | Trey Morris <trey.morris@rackspace.com> | 2010-12-29 21:26:45 -0600 |
|---|---|---|
| committer | Trey Morris <trey.morris@rackspace.com> | 2010-12-29 21:26:45 -0600 |
| commit | da7d31d5a4fa712ae24f6ec56d7469a3ee453c87 (patch) | |
| tree | 2b49ce40f6b89f834368fd4bd039078d09c0fc4b | |
| parent | 2515d8ee9e32e0658b6179e900cf2e0e87a032dc (diff) | |
| download | nova-da7d31d5a4fa712ae24f6ec56d7469a3ee453c87.tar.gz nova-da7d31d5a4fa712ae24f6ec56d7469a3ee453c87.tar.xz nova-da7d31d5a4fa712ae24f6ec56d7469a3ee453c87.zip | |
removed tests.api.openstack.test_servers test_lock, to hell with it. i'm not even sure if testing lock needs to be at this level
| -rw-r--r-- | nova/tests/api/openstack/test_servers.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/nova/tests/api/openstack/test_servers.py b/nova/tests/api/openstack/test_servers.py index 05419fb70..5d23db588 100644 --- a/nova/tests/api/openstack/test_servers.py +++ b/nova/tests/api/openstack/test_servers.py @@ -320,34 +320,6 @@ class ServersTest(unittest.TestCase): self.assertEqual(res.status, '202 Accepted') self.assertEqual(self.server_delete_called, True) - def test_lock(self): - FLAGS.allow_admin_api = True - body = dict(server=dict( - name='server_test', imageId=2, flavorId=2, metadata={}, - personality={})) - req = webob.Request.blank('/v1.0/servers/1/pause') - req.method = 'POST' - req.content_type = 'application/json' - req.body = json.dumps(body) - - # part one: stubs it to be locked and attempt pause expecting exception - def get_locked(self, context, id): - return True - self.stubs.Set(nova.compute.api.ComputeAPI, 'get_lock', get_locked) - - # pause should raise exception on locked instance - self.assertRaises(Exception, req.get_response, nova.api.API('os')) - - # Part two: stubs it to be unlocked and attempt pause expecting success - def get_unlocked(self, context, id): - return False - self.stubs.Set(nova.compute.api.ComputeAPI, 'get_lock', get_unlocked) - - res = req.get_response(nova.api.API('os')) - - # expecting no exception, test will fail if exception is raised - res = req.get_response(nova.api.API('os')) - if __name__ == "__main__": unittest.main() |
