Commit Graph

3 Commits

Author SHA1 Message Date
Jonathan Rosser 1f05792a86 Trace execution of test-ansible-syntax.sh
This makes debugging failed jobs easier.

Change-Id: I24f455d8dbddcc01edf5f8aed2834551e722026c
2020-10-05 09:02:59 +01:00
Jesse Pretorius d861c3902d Improve lint test flexibility
Currently the ansible-syntax and ansible-lint tests
assume the playbook to be tested against, the role
requirements file location and a single path for all
roles. This patch allows these to be modified so that
the tests can be used for the integrated repo which
does not have the same structure as the roles.

Various lint failures are no being picked up with
these modifications, so they're resolved using quick
hacks.

Change-Id: I8bea90082dbde7de49c5e2e86d298c017b16591d
2017-11-17 15:38:43 +00:00
Jesse Pretorius 90d76c59f8 Implement centralised Ansible test scripts
This patch implements test scripts intended for use by all
OpenStack-Ansible role tests.

The intent is to simplify the role tox.ini configuration
and ensure that as many changes to role testing configuration
can be managed from the centralised tests repo instead of
individually in each repository.

This patch implements the scripts to centralise the
ansible-lint, ansible-syntax, and functional Ansible tests.

Functionality included:

- For a simple functional test, the defaults will be allow
  the execution of the test without any parameters set.
- For a scenario test the scripts allow the inventory,
  extra vars and any other CLI parameters for Ansible to be
  set via environment variables.
- Both check mode and an idempotence test.

In addition to this functionality, the bash scripts are all
set to fail on error to ensure that tox shows a failure.

Change-Id: I23c24146485da340d4f046f80e4814652e6e3876
2016-10-05 09:56:12 +01:00