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
This commit is contained in:
pamudithaA 2025-03-13 10:08:20 +08:00 committed by Malith Pamuditha Abeysekara Galle Pathiranage
parent 66d0fd5c2e
commit 8bb25a4d4c
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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"],
)