Fix non-parameterized service id in hypervisors sample tests
The hypervisors sample tests hard code the service id in the templates,
which can vary (and will in a subsequent patch). This makes it parameterized
so that it doesn't obsess over the actual value.
Change-Id: I28ae3eb14aa1630deaf6f943c9ad78dc3c36c7b3
(cherry picked from commit cf1d3f8792
)
This commit is contained in:
parent
6ce8bcab7c
commit
d7ac5d9235
|
@ -20,7 +20,7 @@
|
|||
"running_vms": 0,
|
||||
"service": {
|
||||
"host": "%(host_name)s",
|
||||
"id": 2,
|
||||
"id": "%(int:service_id)s",
|
||||
"disabled_reason": null
|
||||
},
|
||||
"vcpus": 1,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"running_vms": 0,
|
||||
"service": {
|
||||
"host": "%(host_name)s",
|
||||
"id": 2,
|
||||
"id": "%(int:service_id)s",
|
||||
"disabled_reason": null
|
||||
},
|
||||
"vcpus": 1,
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"running_vms": 0,
|
||||
"service": {
|
||||
"host": "%(host_name)s",
|
||||
"id": 2,
|
||||
"id": "%(int:service_id)s",
|
||||
"disabled_reason": null
|
||||
},
|
||||
"vcpus": 1,
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"running_vms": 0,
|
||||
"service": {
|
||||
"host": "%(host_name)s",
|
||||
"id": 2,
|
||||
"id": "%(int:service_id)s",
|
||||
"disabled_reason": null
|
||||
},
|
||||
"vcpus": 1,
|
||||
|
|
|
@ -59,7 +59,8 @@ class HypervisorsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):
|
|||
def test_hypervisors_detail(self):
|
||||
hypervisor_id = '1'
|
||||
subs = {
|
||||
'hypervisor_id': hypervisor_id
|
||||
'hypervisor_id': hypervisor_id,
|
||||
'service_id': '[0-9]+',
|
||||
}
|
||||
response = self._do_get('os-hypervisors/detail')
|
||||
self._verify_response('hypervisors-detail-resp', subs, response, 200)
|
||||
|
@ -67,7 +68,8 @@ class HypervisorsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):
|
|||
def test_hypervisors_show(self):
|
||||
hypervisor_id = '1'
|
||||
subs = {
|
||||
'hypervisor_id': hypervisor_id
|
||||
'hypervisor_id': hypervisor_id,
|
||||
'service_id': '[0-9]+',
|
||||
}
|
||||
response = self._do_get('os-hypervisors/%s' % hypervisor_id)
|
||||
self._verify_response('hypervisors-show-resp', subs, response, 200)
|
||||
|
|
Loading…
Reference in New Issue