From 6aa2b3f19818ed631652e9ec9477aa8e1979f3ff Mon Sep 17 00:00:00 2001 From: Robert Browning Date: Sat, 7 Oct 2023 22:45:46 -0700 Subject: [PATCH 01/12] execute populating the inherited environment variables whenever the parameter is set. Currently the doesn't work for shell commands either, it relies on those commands having default parameters that would then populate the 'parameters' variable to pass that check --- st2client/st2client/commands/action.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/st2client/st2client/commands/action.py b/st2client/st2client/commands/action.py index fb2f94c0f2..48964746a5 100644 --- a/st2client/st2client/commands/action.py +++ b/st2client/st2client/commands/action.py @@ -945,6 +945,9 @@ def normalize(name, value, action_params=None, auto_dict=False): result = {} + if args.inherit_env: + result["env"] = self._get_inherited_env_vars() + if not args.parameters: return result @@ -1008,9 +1011,6 @@ def normalize(name, value, action_params=None, auto_dict=False): del result["_file_name"] - if args.inherit_env: - result["env"] = self._get_inherited_env_vars() - return result @add_auth_token_to_kwargs_from_cli From ab283910dd7a64caf616288a012da5efe72c62bf Mon Sep 17 00:00:00 2001 From: Robert Browning Date: Sun, 15 Oct 2023 15:09:57 -0700 Subject: [PATCH 02/12] add in a unittest and a changelog entry to cover the edge case where we try to inherit env without any parameters --- CHANGELOG.rst | 2 + .../tests/unit/test_command_actionrun.py | 73 +++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d9efe84527..c8f15280ee 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,6 +20,8 @@ Fixed * Fix codecov stackstorm/st2 (https://github.com/StackStorm/st2/issues/6035) +* Fix #4676, edge case where --inherit-env is skipped if the action has no parameters + Added ~~~~~ diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index 1e312e0786..81bf098eec 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -261,3 +261,76 @@ def test_get_params_from_args_with_multiple_declarations(self): # set auto_dict back to default mockarg.auto_dict = False + + def test_correctly_process_inherit_env_when_no_parameters_set(self): + """test_correctly_process_inherit_env_when_no_parameters_set + + This tests that we still correctly pass through the environment variables + when --inherit-env is set and we run a job that does not have parameters + """ + + runner = RunnerType() + runner.runner_parameters = {} + + action = Action() + action.ref = "test.action" + + subparser = mock.Mock() + command = ActionRunCommand(action, self, subparser, name="test") + + mockarg = mock.Mock() + mockarg.inherit_env = True + mockarg.auto_dict = True + mockarg.parameters = [] + + k1 = "key1" + v1 = "value1" + k2 = "key2" + v2 = "value2" + + with mock.patch("os.environ.copy") as mockCopy: + mockCopy.return_value = {k1: v1, k2: v2} + param = command._get_action_parameters_from_args( + action=action, runner=runner, args=mockarg + ) + + self.assertIn("env", param, "did not correctly populate the env field in the returned data from _get_action_parameters_from_args") + + env_params = param["env"] + self.assertIn(k1, env_params, f"did not correctly copy {k1} env variable into the parameters") + self.assertIn(k2, env_params, f"did not correctly copy {k2} env variable into the parameters") + self.assertEqual(v1, env_params[k1], f"did not correctly copy the value for {k1} env variable, {v1}, into the parameters") + self.assertEqual(v2, env_params[k2], f"did not correctly copy the value for {k2} env variable, {v2}, into the parameters") + + def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): + """test_correctly_generate_empty_params_no_inherit_empty_parameters + + Verifies that we return an empty dict when we do not provide inherit env and parameters + """ + + runner = RunnerType() + runner.runner_parameters = {} + + action = Action() + action.ref = "test.action" + + subparser = mock.Mock() + command = ActionRunCommand(action, self, subparser, name="test") + + mockarg = mock.Mock() + mockarg.inherit_env = False + mockarg.auto_dict = True + mockarg.parameters = [] + + k1 = "key1" + v1 = "value1" + k2 = "key2" + v2 = "value2" + + with mock.patch("os.environ.copy") as mockCopy: + mockCopy.return_value = {k1: v1, k2: v2} + param = command._get_action_parameters_from_args( + action=action, runner=runner, args=mockarg + ) + + self.assertDictEqual({}, param, "should return an empty dictionary") \ No newline at end of file From 488367b56d5cdc71a044ea01127d3086731314d3 Mon Sep 17 00:00:00 2001 From: Robert Browning Date: Sun, 15 Oct 2023 15:18:00 -0700 Subject: [PATCH 03/12] fix lint failure --- st2client/tests/unit/test_command_actionrun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index 81bf098eec..f9a08a53a4 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -333,4 +333,4 @@ def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): action=action, runner=runner, args=mockarg ) - self.assertDictEqual({}, param, "should return an empty dictionary") \ No newline at end of file + self.assertDictEqual({}, param, "should return an empty dictionary") From 285b90867a9aa31def19de0c1e021f1527712e17 Mon Sep 17 00:00:00 2001 From: Robert Browning Date: Sun, 15 Oct 2023 15:31:00 -0700 Subject: [PATCH 04/12] see if the long strings were the issue, can't seem to get any of the linting working locally --- st2client/tests/unit/test_command_actionrun.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index f9a08a53a4..a869628a98 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -294,13 +294,13 @@ def test_correctly_process_inherit_env_when_no_parameters_set(self): action=action, runner=runner, args=mockarg ) - self.assertIn("env", param, "did not correctly populate the env field in the returned data from _get_action_parameters_from_args") + self.assertIn("env", param) env_params = param["env"] - self.assertIn(k1, env_params, f"did not correctly copy {k1} env variable into the parameters") - self.assertIn(k2, env_params, f"did not correctly copy {k2} env variable into the parameters") - self.assertEqual(v1, env_params[k1], f"did not correctly copy the value for {k1} env variable, {v1}, into the parameters") - self.assertEqual(v2, env_params[k2], f"did not correctly copy the value for {k2} env variable, {v2}, into the parameters") + self.assertIn(k1, env_params) + self.assertIn(k2, env_params) + self.assertEqual(v1, env_params[k1]) + self.assertEqual(v2, env_params[k2]) def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): """test_correctly_generate_empty_params_no_inherit_empty_parameters @@ -333,4 +333,4 @@ def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): action=action, runner=runner, args=mockarg ) - self.assertDictEqual({}, param, "should return an empty dictionary") + self.assertDictEqual({}, param) From 0d35f892d76c611c8115761d3d2f5964f431b477 Mon Sep 17 00:00:00 2001 From: rebrowning Date: Tue, 31 Oct 2023 19:38:25 -0700 Subject: [PATCH 05/12] add in a unittest that validates the originally working functionality for some of the different parameters are not negatively impacted with the change --- .../tests/unit/test_command_actionrun.py | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index a869628a98..693f1ba399 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -302,6 +302,65 @@ def test_correctly_process_inherit_env_when_no_parameters_set(self): self.assertEqual(v1, env_params[k1]) self.assertEqual(v2, env_params[k2]) + def test_correctly_process_inherit_env_when_parameters_set(self): + """test_correctly_process_inherit_env_when_parameters_set + + This tests that we still correctly pass through the environment variables + when --inherit-env is set and we run a job that has parameters + """ + + runner = RunnerType() + runner.runner_parameters = {} + + action = Action() + action.ref = "test.action" + action.parameters = { + "param_string": {"type": "string"}, + "param_array": {"type": "array"}, + "param_array_of_dicts": {"type": "array"}, + } + + subparser = mock.Mock() + command = ActionRunCommand(action, self, subparser, name="test") + + p_string = "param_string" + p_array = "param_array" + p_ra_dicts = "param_array_of_dicts" + mockarg = mock.Mock() + mockarg.inherit_env = True + mockarg.auto_dict = True + mockarg.parameters = [ + f"{p_string}=hoge", + f"{p_array}=foo,bar", + f"{p_ra_dicts}=foo:1,bar:2", + ] + + k1 = "key1" + v1 = "value1" + k2 = "key2" + v2 = "value2" + + with mock.patch("os.environ.copy") as mockCopy: + mockCopy.return_value = {k1: v1, k2: v2} + param = command._get_action_parameters_from_args( + action=action, runner=runner, args=mockarg + ) + + self.assertIn("env", param) + + env_params = param["env"] + self.assertIn(k1, env_params) + self.assertIn(k2, env_params) + self.assertEqual(v1, env_params[k1]) + self.assertEqual(v2, env_params[k2]) + self.assertIn(p_string, param) + self.assertEqual("hoge", param[p_string]) + self.assertIn(p_array, param) + self.assertIn("foo", param[p_array]) + self.assertIn("bar", param[p_array]) + self.assertIn(p_ra_dicts, param) + self.assertDictEqual({"foo": '1', "bar": '2'}, param[p_ra_dicts][0]) + def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): """test_correctly_generate_empty_params_no_inherit_empty_parameters From 3469f7c288ecc9888f5529414d5b1f9bc0b111fa Mon Sep 17 00:00:00 2001 From: rebrowning Date: Tue, 31 Oct 2023 19:47:06 -0700 Subject: [PATCH 06/12] cleanup --- st2client/tests/unit/test_command_actionrun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index 693f1ba399..6f3f0087f2 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -359,7 +359,7 @@ def test_correctly_process_inherit_env_when_parameters_set(self): self.assertIn("foo", param[p_array]) self.assertIn("bar", param[p_array]) self.assertIn(p_ra_dicts, param) - self.assertDictEqual({"foo": '1', "bar": '2'}, param[p_ra_dicts][0]) + self.assertDictEqual({"foo": "1", "bar": "2"}, param[p_ra_dicts][0]) def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): """test_correctly_generate_empty_params_no_inherit_empty_parameters From f3aedefefc4f797a3b2e351c8c87e6a2f75d3d2d Mon Sep 17 00:00:00 2001 From: rebrowning Date: Tue, 31 Oct 2023 20:06:17 -0700 Subject: [PATCH 07/12] comment update --- st2client/tests/unit/test_command_actionrun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index 6f3f0087f2..9bee2b297d 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -306,7 +306,7 @@ def test_correctly_process_inherit_env_when_parameters_set(self): """test_correctly_process_inherit_env_when_parameters_set This tests that we still correctly pass through the environment variables - when --inherit-env is set and we run a job that has parameters + when --inherit-env is set and we run a job that has action parameters set """ runner = RunnerType() From df0ff92ee81af681173df404ae09af46b258cbe2 Mon Sep 17 00:00:00 2001 From: rebrowning Date: Tue, 31 Oct 2023 20:14:13 -0700 Subject: [PATCH 08/12] uncomment the newest test to validate it's not actually causing a problem --- .../tests/unit/test_command_actionrun.py | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index 9bee2b297d..3549342b5d 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -302,64 +302,64 @@ def test_correctly_process_inherit_env_when_no_parameters_set(self): self.assertEqual(v1, env_params[k1]) self.assertEqual(v2, env_params[k2]) - def test_correctly_process_inherit_env_when_parameters_set(self): - """test_correctly_process_inherit_env_when_parameters_set - - This tests that we still correctly pass through the environment variables - when --inherit-env is set and we run a job that has action parameters set - """ - - runner = RunnerType() - runner.runner_parameters = {} - - action = Action() - action.ref = "test.action" - action.parameters = { - "param_string": {"type": "string"}, - "param_array": {"type": "array"}, - "param_array_of_dicts": {"type": "array"}, - } - - subparser = mock.Mock() - command = ActionRunCommand(action, self, subparser, name="test") - - p_string = "param_string" - p_array = "param_array" - p_ra_dicts = "param_array_of_dicts" - mockarg = mock.Mock() - mockarg.inherit_env = True - mockarg.auto_dict = True - mockarg.parameters = [ - f"{p_string}=hoge", - f"{p_array}=foo,bar", - f"{p_ra_dicts}=foo:1,bar:2", - ] - - k1 = "key1" - v1 = "value1" - k2 = "key2" - v2 = "value2" - - with mock.patch("os.environ.copy") as mockCopy: - mockCopy.return_value = {k1: v1, k2: v2} - param = command._get_action_parameters_from_args( - action=action, runner=runner, args=mockarg - ) - - self.assertIn("env", param) - - env_params = param["env"] - self.assertIn(k1, env_params) - self.assertIn(k2, env_params) - self.assertEqual(v1, env_params[k1]) - self.assertEqual(v2, env_params[k2]) - self.assertIn(p_string, param) - self.assertEqual("hoge", param[p_string]) - self.assertIn(p_array, param) - self.assertIn("foo", param[p_array]) - self.assertIn("bar", param[p_array]) - self.assertIn(p_ra_dicts, param) - self.assertDictEqual({"foo": "1", "bar": "2"}, param[p_ra_dicts][0]) + # def test_correctly_process_inherit_env_when_parameters_set(self): + # """test_correctly_process_inherit_env_when_parameters_set + + # This tests that we still correctly pass through the environment variables + # when --inherit-env is set and we run a job that has action parameters set + # """ + + # runner = RunnerType() + # runner.runner_parameters = {} + + # action = Action() + # action.ref = "test.action" + # action.parameters = { + # "param_string": {"type": "string"}, + # "param_array": {"type": "array"}, + # "param_array_of_dicts": {"type": "array"}, + # } + + # subparser = mock.Mock() + # command = ActionRunCommand(action, self, subparser, name="test") + + # p_string = "param_string" + # p_array = "param_array" + # p_ra_dicts = "param_array_of_dicts" + # mockarg = mock.Mock() + # mockarg.inherit_env = True + # mockarg.auto_dict = True + # mockarg.parameters = [ + # f"{p_string}=hoge", + # f"{p_array}=foo,bar", + # f"{p_ra_dicts}=foo:1,bar:2", + # ] + + # k1 = "key1" + # v1 = "value1" + # k2 = "key2" + # v2 = "value2" + + # with mock.patch("os.environ.copy") as mockCopy: + # mockCopy.return_value = {k1: v1, k2: v2} + # param = command._get_action_parameters_from_args( + # action=action, runner=runner, args=mockarg + # ) + + # self.assertIn("env", param) + + # env_params = param["env"] + # self.assertIn(k1, env_params) + # self.assertIn(k2, env_params) + # self.assertEqual(v1, env_params[k1]) + # self.assertEqual(v2, env_params[k2]) + # self.assertIn(p_string, param) + # self.assertEqual("hoge", param[p_string]) + # self.assertIn(p_array, param) + # self.assertIn("foo", param[p_array]) + # self.assertIn("bar", param[p_array]) + # self.assertIn(p_ra_dicts, param) + # self.assertDictEqual({"foo": "1", "bar": "2"}, param[p_ra_dicts][0]) def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): """test_correctly_generate_empty_params_no_inherit_empty_parameters From 7b4d626f45857b68e6a96e31fce9db41ccdd999b Mon Sep 17 00:00:00 2001 From: rebrowning Date: Tue, 31 Oct 2023 20:15:07 -0700 Subject: [PATCH 09/12] remove the commented code --- .../tests/unit/test_command_actionrun.py | 59 ------------------- 1 file changed, 59 deletions(-) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index 3549342b5d..a869628a98 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -302,65 +302,6 @@ def test_correctly_process_inherit_env_when_no_parameters_set(self): self.assertEqual(v1, env_params[k1]) self.assertEqual(v2, env_params[k2]) - # def test_correctly_process_inherit_env_when_parameters_set(self): - # """test_correctly_process_inherit_env_when_parameters_set - - # This tests that we still correctly pass through the environment variables - # when --inherit-env is set and we run a job that has action parameters set - # """ - - # runner = RunnerType() - # runner.runner_parameters = {} - - # action = Action() - # action.ref = "test.action" - # action.parameters = { - # "param_string": {"type": "string"}, - # "param_array": {"type": "array"}, - # "param_array_of_dicts": {"type": "array"}, - # } - - # subparser = mock.Mock() - # command = ActionRunCommand(action, self, subparser, name="test") - - # p_string = "param_string" - # p_array = "param_array" - # p_ra_dicts = "param_array_of_dicts" - # mockarg = mock.Mock() - # mockarg.inherit_env = True - # mockarg.auto_dict = True - # mockarg.parameters = [ - # f"{p_string}=hoge", - # f"{p_array}=foo,bar", - # f"{p_ra_dicts}=foo:1,bar:2", - # ] - - # k1 = "key1" - # v1 = "value1" - # k2 = "key2" - # v2 = "value2" - - # with mock.patch("os.environ.copy") as mockCopy: - # mockCopy.return_value = {k1: v1, k2: v2} - # param = command._get_action_parameters_from_args( - # action=action, runner=runner, args=mockarg - # ) - - # self.assertIn("env", param) - - # env_params = param["env"] - # self.assertIn(k1, env_params) - # self.assertIn(k2, env_params) - # self.assertEqual(v1, env_params[k1]) - # self.assertEqual(v2, env_params[k2]) - # self.assertIn(p_string, param) - # self.assertEqual("hoge", param[p_string]) - # self.assertIn(p_array, param) - # self.assertIn("foo", param[p_array]) - # self.assertIn("bar", param[p_array]) - # self.assertIn(p_ra_dicts, param) - # self.assertDictEqual({"foo": "1", "bar": "2"}, param[p_ra_dicts][0]) - def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): """test_correctly_generate_empty_params_no_inherit_empty_parameters From cd2d9f43c8dde5f23547b0dd720b1731e6adb202 Mon Sep 17 00:00:00 2001 From: rebrowning Date: Tue, 31 Oct 2023 20:15:49 -0700 Subject: [PATCH 10/12] re-add the test --- .../tests/unit/test_command_actionrun.py | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index a869628a98..9bee2b297d 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -302,6 +302,65 @@ def test_correctly_process_inherit_env_when_no_parameters_set(self): self.assertEqual(v1, env_params[k1]) self.assertEqual(v2, env_params[k2]) + def test_correctly_process_inherit_env_when_parameters_set(self): + """test_correctly_process_inherit_env_when_parameters_set + + This tests that we still correctly pass through the environment variables + when --inherit-env is set and we run a job that has action parameters set + """ + + runner = RunnerType() + runner.runner_parameters = {} + + action = Action() + action.ref = "test.action" + action.parameters = { + "param_string": {"type": "string"}, + "param_array": {"type": "array"}, + "param_array_of_dicts": {"type": "array"}, + } + + subparser = mock.Mock() + command = ActionRunCommand(action, self, subparser, name="test") + + p_string = "param_string" + p_array = "param_array" + p_ra_dicts = "param_array_of_dicts" + mockarg = mock.Mock() + mockarg.inherit_env = True + mockarg.auto_dict = True + mockarg.parameters = [ + f"{p_string}=hoge", + f"{p_array}=foo,bar", + f"{p_ra_dicts}=foo:1,bar:2", + ] + + k1 = "key1" + v1 = "value1" + k2 = "key2" + v2 = "value2" + + with mock.patch("os.environ.copy") as mockCopy: + mockCopy.return_value = {k1: v1, k2: v2} + param = command._get_action_parameters_from_args( + action=action, runner=runner, args=mockarg + ) + + self.assertIn("env", param) + + env_params = param["env"] + self.assertIn(k1, env_params) + self.assertIn(k2, env_params) + self.assertEqual(v1, env_params[k1]) + self.assertEqual(v2, env_params[k2]) + self.assertIn(p_string, param) + self.assertEqual("hoge", param[p_string]) + self.assertIn(p_array, param) + self.assertIn("foo", param[p_array]) + self.assertIn("bar", param[p_array]) + self.assertIn(p_ra_dicts, param) + self.assertDictEqual({"foo": "1", "bar": "2"}, param[p_ra_dicts][0]) + def test_correctly_generate_empty_params_no_inherit_empty_parameters(self): """test_correctly_generate_empty_params_no_inherit_empty_parameters From 011ed2512a7c78b0238d3eecef6de84eeb4af7a3 Mon Sep 17 00:00:00 2001 From: Robert Browning Date: Wed, 15 Nov 2023 07:54:36 -0800 Subject: [PATCH 11/12] Update st2client/tests/unit/test_command_actionrun.py Co-authored-by: Jacob Floyd --- st2client/tests/unit/test_command_actionrun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index 9bee2b297d..2916c57be8 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -306,7 +306,7 @@ def test_correctly_process_inherit_env_when_parameters_set(self): """test_correctly_process_inherit_env_when_parameters_set This tests that we still correctly pass through the environment variables - when --inherit-env is set and we run a job that has action parameters set + when --inherit-env is set and we run an action that has action parameters set """ runner = RunnerType() From 6e455fb2dbce7a473fc4a35b1732c280e37c9b1b Mon Sep 17 00:00:00 2001 From: Robert Browning Date: Wed, 15 Nov 2023 07:54:42 -0800 Subject: [PATCH 12/12] Update st2client/tests/unit/test_command_actionrun.py Co-authored-by: Jacob Floyd --- st2client/tests/unit/test_command_actionrun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2client/tests/unit/test_command_actionrun.py b/st2client/tests/unit/test_command_actionrun.py index 2916c57be8..afd6fb418d 100644 --- a/st2client/tests/unit/test_command_actionrun.py +++ b/st2client/tests/unit/test_command_actionrun.py @@ -266,7 +266,7 @@ def test_correctly_process_inherit_env_when_no_parameters_set(self): """test_correctly_process_inherit_env_when_no_parameters_set This tests that we still correctly pass through the environment variables - when --inherit-env is set and we run a job that does not have parameters + when --inherit-env is set and we run an action that does not have parameters """ runner = RunnerType()