Add unittest for yamlgroup inventory plugin

This mocks out enough of the Ansible inventory framework so we can
test the group matching against a range of corner cases as present in
the results.yaml file.

Change-Id: I05114d9aae6f149122da20f239c8b3546bc140bc
This commit is contained in:
Ian Wienand
2018-11-01 15:31:44 +11:00
parent e998db36f2
commit 526a423dd2
5 changed files with 164 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ commands =
python3 {toxinidir}/tools/sorted_modules_env.py {toxinidir}/modules.env
python3 {toxinidir}/tools/irc_checks.py
python3 {toxinidir}/tools/check_clouds_yaml.py
python3 -m unittest playbooks/roles/install-ansible/files/inventory_plugins/test_yamlgroup.py
# Ansible Lint Check
bash -c "find roles playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
ansible-lint -x ANSIBLE0004 -x ANSIBLE0006 -x ANSIBLE0007 -x ANSIBLE0011 \