From 8bb25a4d4c686f5f54f50dd4484f80301c81c77e Mon Sep 17 00:00:00 2001 From: pamudithaA Date: Thu, 13 Mar 2025 10:08:20 +0800 Subject: [PATCH] fix(doc): tempest charm handler.py error string This is a minor update to fix error messsage prompted to user referring to "list-tests". Instead correct action is get-lists. Updated assertion text in unit tests to check for correct get-lists action. Closes-Bug: 2098859 Change-Id: If2948dbd46444e237869866dfa4ca2e6196c0cc9 --- charms/tempest-k8s/src/handlers.py | 2 +- charms/tempest-k8s/tests/unit/test_tempest_charm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charms/tempest-k8s/src/handlers.py b/charms/tempest-k8s/src/handlers.py index 348bd1b4..f5c9c8fa 100644 --- a/charms/tempest-k8s/src/handlers.py +++ b/charms/tempest-k8s/src/handlers.py @@ -247,7 +247,7 @@ class TempestPebbleHandler(sunbeam_chandlers.ServicePebbleHandler): if test_list and test_list not in self.get_test_lists(): raise RuntimeError( f"'{test_list}' is not a known test list. " - "Please run list-tests action to view available lists." + "Please run get-lists action to view available lists." ) # now build the command line for tempest diff --git a/charms/tempest-k8s/tests/unit/test_tempest_charm.py b/charms/tempest-k8s/tests/unit/test_tempest_charm.py index fe7f52b7..3c486996 100644 --- a/charms/tempest-k8s/tests/unit/test_tempest_charm.py +++ b/charms/tempest-k8s/tests/unit/test_tempest_charm.py @@ -294,7 +294,7 @@ class TestTempestOperatorCharm(test_utils.CharmTestCase): self.harness.charm._on_validate_action(action_event) action_event.fail.assert_called_once() self.assertEqual( - "'nonexistent' is not a known test list. Please run list-tests action to view available lists.", + "'nonexistent' is not a known test list. Please run get-lists action to view available lists.", action_event.set_results.call_args.args[0]["error"], )