Merge "nova-net: Migrate 'test_hypervisors' functional tests"

This commit is contained in:
Zuul 2019-10-05 13:57:13 +00:00 committed by Gerrit Code Review
commit 85b83f972d
2 changed files with 3 additions and 4 deletions

View File

@ -33,7 +33,7 @@
"running_vms": 0, "running_vms": 0,
"service": { "service": {
"host": "%(host_name)s", "host": "%(host_name)s",
"id": 6, "id": "%(int:service_id)s",
"disabled_reason": null "disabled_reason": null
}, },
"vcpus": 2, "vcpus": 2,

View File

@ -101,7 +101,6 @@ class HypervisorsSampleJson228Tests(HypervisorsSampleJsonTests):
class HypervisorsSampleJson233Tests(api_sample_base.ApiSampleTestBaseV21): class HypervisorsSampleJson233Tests(api_sample_base.ApiSampleTestBaseV21):
USE_NEUTRON = False
ADMIN_API = True ADMIN_API = True
sample_dir = "os-hypervisors" sample_dir = "os-hypervisors"
microversion = '2.33' microversion = '2.33'
@ -119,12 +118,12 @@ class HypervisorsSampleJson233Tests(api_sample_base.ApiSampleTestBaseV21):
response = self._do_get('os-hypervisors?limit=1&marker=1') response = self._do_get('os-hypervisors?limit=1&marker=1')
self._verify_response('hypervisors-list-resp', {}, response, 200) self._verify_response('hypervisors-list-resp', {}, response, 200)
# TODO(stephenfin): Migrate off of nova-network
def test_hypervisors_detail(self): def test_hypervisors_detail(self):
subs = { subs = {
'hypervisor_id': '2', 'hypervisor_id': '2',
'host': 'host1', 'host': 'host1',
'host_name': 'host1' 'host_name': 'host1',
'service_id': '[0-9]+',
} }
response = self._do_get('os-hypervisors/detail?limit=1&marker=1') response = self._do_get('os-hypervisors/detail?limit=1&marker=1')
self._verify_response('hypervisors-detail-resp', subs, response, 200) self._verify_response('hypervisors-detail-resp', subs, response, 200)