Skip to content

Only use Mongo DB type during local testing - Local Testing with 1/3rd the wait!#616

Merged
wtgee merged 3 commits intopanoptes:developfrom
wtgee:only-use-mongo-testing-locally
Sep 21, 2018
Merged

Only use Mongo DB type during local testing - Local Testing with 1/3rd the wait!#616
wtgee merged 3 commits intopanoptes:developfrom
wtgee:only-use-mongo-testing-locally

Conversation

@wtgee
Copy link
Copy Markdown
Member

@wtgee wtgee commented Sep 20, 2018

* Adds --test-all-databases option which is False by default but enabled for travis tests.

Edit: Added --test-databases [<db_name>] option to support testing of certain db types.

Call with, e.g. pytest -xv --test-databases file memory. Supports an all option (which travis uses). Default 'mongo' only.

Helps with #191 .

* Adds `--test-all-databases` option which is False by default but
enabled for travis tests.
@wtgee wtgee requested a review from jamessynge September 20, 2018 23:02
Comment thread conftest.py
@@ -214,6 +219,10 @@ def can_connect_to_mongo():

@pytest.fixture(scope='function', params=['mongo', 'file', 'memory'])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I'd prefer an additional option that is the list of dbs to be tested, which then would provide the value for params.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's almost what I did. Would be easy enough to change if we feel it is worth it do to right now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to support this now. Call with, e.g. pytest -xv --test-databases file memory. Supports an all option (which travis uses). Default 'mongo' only.

@wtgee wtgee merged commit 59344a5 into panoptes:develop Sep 21, 2018
@wtgee wtgee deleted the only-use-mongo-testing-locally branch September 21, 2018 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants