Fix functional action CLI test

* After the action provider refactoring one CLI test in the client
  fails because, in fact, there was a non-backwards compatible
  change made during the refactoring: we can't use IDs of actions
  to find them anymore. It was a trade-off that we had to agree on
  in order to implement action providers. So the failing tests
  has now been rewritten to work with name istead of ID.

Change-Id: Ic58b7bb5ec6a38df2c2e538f16b24be48e286e8c
This commit is contained in:
Renat Akhmerov
2020-12-07 11:34:45 +07:00
parent 152fc795fa
commit 668712eba2

@ -1392,13 +1392,13 @@ class ActionCLITests(base_v2.MistralClientTestBase):
self.assertNotIn('404 Not Found', definition)
def test_action_get_with_id(self):
def test_action_get_with_name(self):
created = self.action_create(self.act_def)
action_name = created[0]['Name']
action_id = created[0]['ID']
fetched = self.mistral_admin('action-get', params=action_id)
fetched = self.mistral_admin('action-get', params=action_name)
fetched_action_name = self.get_field_value(fetched, 'Name')
self.assertEqual(action_name, fetched_action_name)