def test_delete_volume(self): self.stubs.Set(SolidFireDriver, '_issue_api_request', self.fake_issue_api_request) testvol = {'project_id': 'testprjid', 'name': 'test_volume', 'size': 1, 'id': 'a720b3c0-d1f0-11e1-9b23-0800200c9a66'} sfv = SolidFireDriver(configuration=self.configuration) sfv.delete_volume(testvol)
def test_delete_volume(self): self.stubs.Set(SolidFireDriver, '_issue_api_request', self.fake_issue_api_request) testvol = {'project_id': 'testprjid', 'name': 'test_volume', 'size': 1, 'id': 'a720b3c0-d1f0-11e1-9b23-0800200c9a66', 'created_at': timeutils.utcnow()} sfv = SolidFireDriver(configuration=self.configuration) sfv.delete_volume(testvol)
def test_delete_volume(self): self.stubs.Set(SolidFireDriver, "_issue_api_request", self.fake_issue_api_request) testvol = { "project_id": "testprjid", "name": "test_volume", "size": 1, "id": "a720b3c0-d1f0-11e1-9b23-0800200c9a66", "created_at": timeutils.utcnow(), } sfv = SolidFireDriver(configuration=self.configuration) sfv.delete_volume(testvol)
def test_delete_volume_fails_no_volume(self): self.stubs.Set(SolidFireDriver, '_issue_api_request', self.fake_issue_api_request) testvol = {'project_id': 'testprjid', 'name': 'no-name', 'size': 1, 'id': 'a720b3c0-d1f0-11e1-9b23-0800200c9a66'} sfv = SolidFireDriver(configuration=self.configuration) try: sfv.delete_volume(testvol) self.fail("Should have thrown Error") except Exception: pass
def test_delete_volume_fails_no_volume(self): self.stubs.Set(SolidFireDriver, '_issue_api_request', self.fake_issue_api_request) testvol = {'project_id': 'testprjid', 'name': 'no-name', 'size': 1, 'id': 'a720b3c0-d1f0-11e1-9b23-0800200c9a66', 'created_at': timeutils.utcnow()} sfv = SolidFireDriver(configuration=self.configuration) try: sfv.delete_volume(testvol) self.fail("Should have thrown Error") except Exception: pass
def test_delete_volume_fails_no_volume(self): self.stubs.Set(SolidFireDriver, "_issue_api_request", self.fake_issue_api_request) testvol = { "project_id": "testprjid", "name": "no-name", "size": 1, "id": "a720b3c0-d1f0-11e1-9b23-0800200c9a66", "created_at": timeutils.utcnow(), } sfv = SolidFireDriver(configuration=self.configuration) try: sfv.delete_volume(testvol) self.fail("Should have thrown Error") except Exception: pass