mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-20 02:39:02 +00:00
Remove redundant callback hooks
v2_runner_on_starts gets called by ansible right after the strategy has called on_task_start or on_handler_start. So there is no need to keep this code as the minimum ansible-core version is guaranteed to have this function. on_cleanup (removed around ansible-core 2.0) and on_no_hosts (removed around ansible-core 2.5) never get called.
This commit is contained in:
parent
855beecd82
commit
81873ea059
2 changed files with 12 additions and 43 deletions
|
|
@ -37,19 +37,6 @@ class TestOpentelemetry(unittest.TestCase):
|
|||
host=self.mock_host, task=self.mock_task, return_data={}, task_fields=self.task_fields
|
||||
)
|
||||
|
||||
def test_start_task(self):
|
||||
tasks_data = OrderedDict()
|
||||
|
||||
self.opentelemetry.start_task(tasks_data, False, "myplay", self.mock_task)
|
||||
|
||||
task_data = tasks_data["myuuid"]
|
||||
self.assertEqual(task_data.uuid, "myuuid")
|
||||
self.assertEqual(task_data.name, "mytask")
|
||||
self.assertEqual(task_data.path, "/mypath")
|
||||
self.assertEqual(task_data.play, "myplay")
|
||||
self.assertEqual(task_data.action, "myaction")
|
||||
self.assertEqual(task_data.args, {})
|
||||
|
||||
def test_run_task_with_host(self):
|
||||
tasks_data = OrderedDict()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue