From 668712eba2aa36fe4d3a2f85d14ff7dcae1dd4c9 Mon Sep 17 00:00:00 2001 From: Renat Akhmerov Date: Mon, 7 Dec 2020 11:34:45 +0700 Subject: [PATCH] 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 --- mistralclient/tests/functional/cli/v2/test_cli_v2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mistralclient/tests/functional/cli/v2/test_cli_v2.py b/mistralclient/tests/functional/cli/v2/test_cli_v2.py index 08e720e5..f5602bbb 100644 --- a/mistralclient/tests/functional/cli/v2/test_cli_v2.py +++ b/mistralclient/tests/functional/cli/v2/test_cli_v2.py @@ -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)