This Ansible role makes use of the molecule testing framework to run automatic integration tests for every change.
Molecule is using Python 2.7 with the latest stable release of Ansible to deploy this Ansible role. After succesfully deploying the entire role, Molecule then uses Inspec to perform a set of tests against the final containers. This ensures that for every supported operating system, the end result is what we expect.
All changes submitted via Pull Requests are blocked from merging until the integration tests pass.
In order to speed up local development, you may opt to locally run the integration tests to more quickly iterate on new features.
git clone your fork of the sensu-ansible repository and cd into your local clone.upstream repo to your local clone of the repository with the following git command:
bash
git remote add upstream https://github.com/sensu/sensu-ansible.git
git checkout -b feature/NEW_FEATURE_NAME_HERE to work on a dedicated branchpipenv install --two --dev followed by gem install rubocoppipenv run molecule test --scenario-name $OS --driver-name docker --destroy always$OS above to one of debian, ubuntu, centos, fedora, amazonlinux, or oraclelinux.--destroy always to --destroy never such that you don't have to full rebuild the testing infrastructure.pipenv run molecule verify --scenario-name $OS to re-run those steps.