ansible-community / ara

ARA Records Ansible and makes it easier to understand and troubleshoot.

Home Page:https://ara.recordsansible.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Write integration tests for new ARA_RECORD_ settings

dmsimard opened this issue · comments

What is the idea ?

The callback has grown three new settings thanks to the contributions in #458 and #496:

  • ARA_RECORD_USER_NAME (to manually override the recorded user for a playbook)
  • ARA_RECORD_CONTROLLER_NAME (to manually override the recorded controller for a playbook)
  • ARA_RECORD_TASK_CONTENT (to prevent ara from recording task content)

Before releasing 1.7.0, there needs to be a minimum of testing coverage for them.

It might end up looking similar to what we do when testing controller hostnames:

ara/tests/basic.yaml

Lines 191 to 194 in d736213

- name: Run lookup integration tests
environment:
ARA_LOCALHOST_AS_HOSTNAME: "{{ ara_localhost_as_hostname | default(true) }}"
command: "ansible-playbook -vvv {{ _test_root }}/lookups.yaml"

And then, in something like the lookups test playbook, we'd add tests to validate that we have indeed the expected name, hostname and that we don't have the task content.