mhansen / ansible-trace

Visualise Ansible execution time across playbooks, tasks, and hosts.
GNU General Public License v3.0
97 stars 3 forks source link

feat(integration tests): Utilities for testing ansible-trace #15

Closed louisquentinjoucla closed 2 years ago

louisquentinjoucla commented 2 years ago

Hello everyone :wave: !

This is the first step for #10

This proposition allow creating tests using pytest framework where we can chose strategy, inventory for the same playbook file (see tests/integration/tests/basic.py) I have also made some utilities functions that parse trace to ensure its integrity. This include also related github action CI.yml (here a sample)

Waiting for your feedback, Thanks!

mhansen commented 2 years ago

This overall looks really good to me. Thanks so much for writing these tests. I really like how they're integration-level tests that actually run Ansible, and have semantic validations on the output (e.g. timestamps nest).

louisquentinjoucla commented 2 years ago

Review taken in account ! Lint pep8, removed the symlinks stuff, and changed sub name. Waiting for this one to be merge before rebasing other PRs!

Do not hesitate if something is still not good!