"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cinder/tests/unit/api/contrib/test_volume_manage.py" between
cinder-15.5.0.tar.gz and cinder-15.6.0.tar.gz

About: OpenStack Cinder (Core Service: Block Storage) provides persistent block storage to running instances. Its pluggable driver architecture facilitates the creation and management of block storage devices.
The "Train" series (maintained release).

test_volume_manage.py  (cinder-15.5.0):test_volume_manage.py  (cinder-15.6.0)
skipping to change at line 197 skipping to change at line 197
req.headers['Content-Type'] = 'application/json' req.headers['Content-Type'] = 'application/json'
req.environ['cinder.context'] = self._admin_ctxt req.environ['cinder.context'] = self._admin_ctxt
req.headers["OpenStack-API-Version"] = "volume " + version req.headers["OpenStack-API-Version"] = "volume " + version
req.api_version_request = api_version.APIVersionRequest(version) req.api_version_request = api_version.APIVersionRequest(version)
req.body = jsonutils.dump_as_bytes(body) req.body = jsonutils.dump_as_bytes(body)
res = req.get_response(app_v3()) res = req.get_response(app_v3())
return res return res
@ddt.data({'host': 'host_ok'}, @ddt.data({'host': 'host_ok'},
{'host': 'user@host#backend:/vol_path'}, {'host': 'user@host#backend:/vol_path'},
{'host': 'host@backend#parts+of+pool'}) {'host': 'host@backend#parts+of+pool'},
{'host': 'host@backend#[dead:beef::cafe]:/vol01'})
@ddt.unpack @ddt.unpack
@mock.patch('cinder.volume.api.API.manage_existing', wraps=api_manage) @mock.patch('cinder.volume.api.API.manage_existing', wraps=api_manage)
def test_manage_volume_ok(self, mock_api_manage, host): def test_manage_volume_ok(self, mock_api_manage, host):
"""Test successful manage volume execution. """Test successful manage volume execution.
Tests for correct operation when valid arguments are passed in the Tests for correct operation when valid arguments are passed in the
request body. We ensure that cinder.volume.api.API.manage_existing got request body. We ensure that cinder.volume.api.API.manage_existing got
called with the correct arguments, and that we return the correct HTTP called with the correct arguments, and that we return the correct HTTP
code to the caller. code to the caller.
""" """
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)