From da2638b0e04f77e10b54ca4622e863319896aa53 Mon Sep 17 00:00:00 2001 From: Sergey Skripnick Date: Mon, 20 May 2013 12:03:19 +0300 Subject: Raise AgentBuildNotFound on updating/destroying deleted object Methods below should raise an exception when attempting to operate with deleted AgentBuild objects: nova.db.sqlalchemy.api.agent_build_destroy() nova.db.sqlalchemy.api.agent_build_update() Fixes: bug 1181967 Change-Id: If6df202afb7ea41634c35f7a52988e19677f4d65 --- nova/tests/test_db_api.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py index 0ec1d2c06..56146cefe 100644 --- a/nova/tests/test_db_api.py +++ b/nova/tests/test_db_api.py @@ -3758,14 +3758,12 @@ class AgentBuildTestCase(test.TestCase, ModelsObjectComparatorMixin): db.agent_build_update(self.ctxt, agent_build.id, {'os': 'ReactOS'}) self.assertEqual('ReactOS', db.agent_build_get_all(self.ctxt)[0].os) - @test.testtools.skip("bug 1181967") def test_agent_build_destroy_destroyed(self): agent_build = db.agent_build_create(self.ctxt, {}) db.agent_build_destroy(self.ctxt, agent_build.id) self.assertRaises(exception.AgentBuildNotFound, db.agent_build_destroy, self.ctxt, agent_build.id) - @test.testtools.skip("bug 1181967") def test_agent_build_update_destroyed(self): agent_build = db.agent_build_create(self.ctxt, {'os': 'HaikuOS'}) db.agent_build_destroy(self.ctxt, agent_build.id) -- cgit