Fix preinstalled workflows tests

The 'std' prefix was removed from the workflow name
make sure it passes on both cases.

Change-Id: I072fad4bf88cb078a0ae9d911c6ed06764f66036
This commit is contained in:
Eyal 2020-02-26 14:49:26 +02:00
parent dc827496ad
commit 7acca6deff
4 changed files with 13 additions and 8 deletions

View File

@ -22,6 +22,8 @@
required-projects: required-projects:
- openstack/heat - openstack/heat
- openstack/mistral - openstack/mistral
- openstack/mistral-lib
- openstack/mistral-extra
- openstack/python-mistralclient - openstack/python-mistralclient
- project: - project:
@ -49,9 +51,9 @@
# run in Pike and beyond. # run in Pike and beyond.
# If you need any support to debug these jobs in case of # If you need any support to debug these jobs in case of
# failures, please reach us on #tripleo IRC channel. # failures, please reach us on #tripleo IRC channel.
- tripleo-ci-centos-7-containers-multinode - tripleo-ci-centos-7-containers-multinode:
voting: false
gate: gate:
jobs: jobs:
- python-mistralclient-functional-devstack - python-mistralclient-functional-devstack
- tripleo-ci-centos-7-containers-multinode

View File

@ -83,6 +83,9 @@ class MistralClientTestBase(base.MistralCLIAuth, base.MistralCLIAltAuth):
def setUp(self): def setUp(self):
super(MistralClientTestBase, self).setUp() super(MistralClientTestBase, self).setUp()
def assertPartIn(self, needle, haystack, message=''):
self.assertTrue(any(needle in s for s in haystack), message)
def get_field_value(self, obj, field): def get_field_value(self, obj, field):
return [ return [
o['Value'] for o in obj o['Value'] for o in obj

View File

@ -26,8 +26,8 @@ class StandardItemsAvailabilityCLITests(base_v2.MistralClientTestBase):
wfs, wfs,
["Name", "Tags", "Input", "Created at", "Updated at"] ["Name", "Tags", "Input", "Created at", "Updated at"]
) )
self.assertIn("std.create_instance", self.assertPartIn("create_instance",
[workflow["Name"] for workflow in wfs]) [workflow["Name"] for workflow in wfs])
wfs = self.mistral_alt_user("workflow-list") wfs = self.mistral_alt_user("workflow-list")
@ -35,8 +35,8 @@ class StandardItemsAvailabilityCLITests(base_v2.MistralClientTestBase):
wfs, wfs,
["Name", "Tags", "Input", "Created at", "Updated at"] ["Name", "Tags", "Input", "Created at", "Updated at"]
) )
self.assertIn("std.create_instance", self.assertPartIn("create_instance",
[workflow["Name"] for workflow in wfs]) [workflow["Name"] for workflow in wfs])
def test_std_actions_availability(self): def test_std_actions_availability(self):
acts = self.mistral_admin("action-list") acts = self.mistral_admin("action-list")

View File

@ -573,7 +573,7 @@ class WorkflowCLITests(base_v2.MistralClientTestBase):
workflows = self.parser.listing( workflows = self.parser.listing(
self.mistral( self.mistral(
'workflow-list', 'workflow-list',
params='--filter name=std.create_instance' params='--filter name=in:std.create_instance,create_instance'
) )
) )
@ -585,7 +585,7 @@ class WorkflowCLITests(base_v2.MistralClientTestBase):
self.assertEqual(1, len(workflows)) self.assertEqual(1, len(workflows))
self.assertIn('std.create_instance', workflows[0]['Name']) self.assertIn('create_instance', workflows[0]['Name'])
class ExecutionCLITests(base_v2.MistralClientTestBase): class ExecutionCLITests(base_v2.MistralClientTestBase):