Fix input on execution create
This fix apparently broke it https://review.openstack.org/#/c/121510/4/mistral/api/controllers/v2/execution.py Added the dict to unit-tests. Tested with client: mistral execution-create wb1.wf1 '{ "str1":"foo", "str2":"bar" }' Change-Id: I75be2ab35210f1a7f1bdca1a18c1f7f375862d27
This commit is contained in:
parent
45947ac2e4
commit
bbb1efbc1c
@ -49,6 +49,9 @@ class Execution(resource.Resource):
|
||||
def to_dict(self):
|
||||
d = super(Execution, self).to_dict()
|
||||
|
||||
if d.get('input'):
|
||||
d['input'] = json.loads(d['input'])
|
||||
|
||||
if d.get('output'):
|
||||
d['output'] = json.loads(d['output'])
|
||||
|
||||
|
@ -32,7 +32,7 @@ EXEC_DB = models.Execution(
|
||||
wf_name='some',
|
||||
wf_spec={'name': 'some'},
|
||||
state=states.RUNNING,
|
||||
input={},
|
||||
input={'foo': 'bar'},
|
||||
output={},
|
||||
created_at=datetime.datetime(1970, 1, 1),
|
||||
updated_at=datetime.datetime(1970, 1, 1)
|
||||
@ -40,7 +40,7 @@ EXEC_DB = models.Execution(
|
||||
|
||||
EXEC = {
|
||||
'id': '123',
|
||||
'input': '{}',
|
||||
'input': '{"foo": "bar"}',
|
||||
'output': '{}',
|
||||
'state': 'RUNNING',
|
||||
'created_at': '1970-01-01 00:00:00',
|
||||
|
Loading…
Reference in New Issue
Block a user