Fix sample-create in v2 api calls
A dict embedded in a list is the expected input. In
47934c777c
the list was lost, this
puts it back.
Note that the _exact_ date of this failure was identified by
existing Rally jobs which started failing in early August. That made
searching the commit logs straightforward.
Change-Id: I37e794de7a23b8ce8e67a086732af5a19f182409
Closes-Bug: #1367867
This commit is contained in:
parent
4cef2bf39a
commit
c5d7f96914
|
@ -103,7 +103,7 @@ class SampleManagerTest(utils.BaseTestCase):
|
|||
expect = [
|
||||
'POST', '/v2/meters/instance'
|
||||
]
|
||||
self.http_client.assert_called(*expect, body=CREATE_SAMPLE)
|
||||
self.http_client.assert_called(*expect, body=[CREATE_SAMPLE])
|
||||
self.assertIsNotNone(sample)
|
||||
|
||||
def test_limit(self):
|
||||
|
|
|
@ -47,6 +47,6 @@ class SampleManager(base.Manager):
|
|||
new = dict((key, value) for (key, value) in kwargs.items()
|
||||
if key in CREATION_ATTRIBUTES)
|
||||
url = self._path(counter_name=kwargs['counter_name'])
|
||||
body = self.api.post(url, json=new).json()
|
||||
body = self.api.post(url, json=[new]).json()
|
||||
if body:
|
||||
return [Sample(self, b) for b in body]
|
||||
|
|
Loading…
Reference in New Issue