Fix ServerMigrationSampleJsonTests to use sample files from version dir
The ServerMigrationSampleJsonTests functional tests set up ``self.api.microversion`` to 2.22 in its' setUp(), which use sample files from non version dir. For consistency, this commit makes these tests to use sample files from versioned dir. Change-Id: I9af2348cf7dba53e0fef4054bcedcd5b0c626f50
This commit is contained in:
parent
50f40854b0
commit
064f215172
@ -167,7 +167,7 @@ Request
|
||||
|
||||
**Example Force Migration Complete (force_complete Action)**
|
||||
|
||||
.. literalinclude:: ../../doc/api_samples/server-migrations/force_complete.json
|
||||
.. literalinclude:: ../../doc/api_samples/server-migrations/v2.22/force_complete.json
|
||||
:language: javascript
|
||||
|
||||
Response
|
||||
|
@ -29,12 +29,12 @@ from nova.tests.unit import fake_instance
|
||||
class ServerMigrationsSampleJsonTest(test_servers.ServersSampleBase):
|
||||
sample_dir = 'server-migrations'
|
||||
scenarios = [('v2_22', {'api_major_version': 'v2.1'})]
|
||||
microversion = '2.22'
|
||||
|
||||
def setUp(self):
|
||||
"""setUp method for server usage."""
|
||||
super(ServerMigrationsSampleJsonTest, self).setUp()
|
||||
self.uuid = self._post_server()
|
||||
self.api.microversion = '2.22'
|
||||
|
||||
@mock.patch.object(conductor_manager.ComputeTaskManager, '_live_migrate')
|
||||
@mock.patch.object(db, 'service_get_by_compute_host')
|
||||
|
Loading…
Reference in New Issue
Block a user