ansible / community

This repository is being archived. See https://github.com/ansible-community/presentations and https://github.com/ansible-community/meetings for the new locations
Apache License 2.0
489 stars 144 forks source link

MongoDB Module Integration Tests #445

Closed rhysmeister closed 4 years ago

rhysmeister commented 5 years ago

This is a request for volunteers to help implement a full set of integration tests for the mongodb modules ansible has. Prompted by this issue.

These are currently...

mongodb_user mongodb_parameter mongodb_shard (accepted into devel branch) mongodb_replicaset (PR open (https://github.com/ansible/ansible/pull/49690))

Some work on tests for mongodb_replicaset and mongodb_shard has already been done. This can be found in the following repo branch(https://github.com/rhysmeister/ansible/tree/mongodb_replicaset_int_tests)...

The tests can be executed as follows...

test/runner/ansible-test integration -v mongodb_replicaset --docker ubuntu1604
test/runner/ansible-test integration -v mongodb_shard --docker ubuntu1604

Here's how I see the first steps..

  1. Review of current integration tests for the inevitable required changes. 1.1 Move MongoDB setup to setup_mongodb role? DONE 1.2 Add tests using auth to mongodb_replicaset DONE 1.3 Add tests using auth to mongodb_shard DONE 1.4 And so on...
  2. Volunteer / Lead for mongodb_user module tests.
  3. Volunteer / Lead for mongodb_parameter module tests.

As a first step I'd suggest we stick to a single OS (ubuntu1604) and add support for others at a later date. I'm happy to take up the work for the mongodb_replicaset/shard modules but also happy to hand it over if anyone else is keen.

cc @elliotttf @gw0 @adq @podollb @laggyluke @cove @jirutka @prakritish @marcosdiez @Lujeni @jonathanbeber @mrgnr @robinro @petrovicboban @dagwieers @gyurco @falexandrou @jkramarz @jorijinnall @mdiez-modus @overhacked @incognito1990 @carlochess cc @sivel @resmo

rhysmeister commented 5 years ago

Tip: Include the following in your meta/main.yml file to use the setup_mongodb role...

dependencies:
  - setup_mongodb

This role basically just installs the mongod/mongos/mongo packages in your docker environment.

rhysmeister commented 4 years ago

All modules have tests.