ansible-collection-php_roles
ansible-collection-php_roles copied to clipboard
Configure automated integration tests
I would like to have a few demo playbooks... well at least one or two for starters:
- Show a demo LAMP (Apache + MySQL + Memcached) stack using these roles.
- Show a demo LEPP (Nginx + Postgres + Redis) stack using these roles.
I'm considering using molecule, though some have suggested ansible-test
would be a good fit?
Also document how to run tests locally in the README under 'Development' (there's a TODO there right now).
That setup (if not using molecule) is... extremely ambitious because ansible-test
doesn't allow dependent role installation (I'd have to do this manually), doesn't clean up between integration tests (I'd need to parse those out manually), doesn't do idempotence tests (I'd have to build a runme.sh
shell script to do it for me), and is generally not as simple as molecule to integrate in different ways.
I'm thinking maybe just one test that installs each of the roles then tests that support is there for each of the relevant extensions or extra bits. php_versions
would be the special case...
Left a blog post based on today's learnings: https://www.jeffgeerling.com/blog/2019/how-add-integration-tests-ansible-collection-ansible-test
I think before closing this issue I'd like to make the integration test do all of the individual roles... maybe have one target for each, and the last target would be the actual tests? Or just do them all in one target.