-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make tests configurable against backend #2351
Conversation
f9af291
to
d561d2d
Compare
test/configs/default.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will only need this in the future when we have completed separating the plugins.
|
||
|
||
@pytest.mark.parametrize("db", [DBConfig.mongodb_empty], indirect=True) | ||
def test_execute_complex_query_mongodb(db): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to test.backends.mongodb.test_query.py
|
||
|
||
@pytest.mark.parametrize("db", [DBConfig.sqldb_empty], indirect=True) | ||
def test_execute_complex_query_sqldb_auto_schema(db): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to test.backends.ibis.test_query.py
import os | ||
|
||
import pytest | ||
|
||
skip = not os.environ.get('SUPERDUPER_CONFIG', "").endswith('ibis.yaml') | ||
|
||
if skip: | ||
pytest.skip("Skipping this file for now", allow_module_level=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move the whole ibis test module to the ibis plugins next.
import os | ||
|
||
import pytest | ||
|
||
skip = not os.environ.get('SUPERDUPER_CONFIG', "").endswith('mongodb.yaml') | ||
|
||
if skip: | ||
pytest.skip("Skipping this file for now", allow_module_level=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move the whole ibis test module to the mongodb plugins next.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
d561d2d
to
4cfdb11
Compare
@@ -55,7 +50,7 @@ def test_downstream_task_workflows_are_triggered(db, data, flatten): | |||
|
|||
downstream_listener = downstream_model.to_listener( | |||
key=upstream_listener.outputs_key, | |||
select=upstream_listener.outputs_select, | |||
select=db[upstream_listener.outputs].select(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to discuss this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted to upstream_listener.outputs_select
4cfdb11
to
2140750
Compare
@@ -225,4 +227,6 @@ ext_testing: ## Execute integration testing | |||
|
|||
|
|||
usecase_testing: ## Execute usecase testing | |||
pytest $(PYTEST_ARGUMENTS) ./test/integration/usecase | |||
# TODO After we have completed separating the plugins, we can run the tests only on default.yaml. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should somehow sync with the use-cases which @kartik4949 has added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably these integration tests will go to plugin tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some need to be moved, but some integration tests that use the default configuration must be retained to test complex workflows.
def test_insert_sql_db(db): | ||
db.cfg.auto_schema = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should think about making auto_schema
true by default in tests also (for later).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is eager mode a use-case? Not critical currently, but might be worth reorganizing a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice PR! That's a lot of work done to get this logic uniform. Thanks for the hard work.
Interestingly, there wasn't much to change in the main codebase, only the tests. |
Description
Related Issues
Checklist
make unit_testing
andmake integration-testing
successfully?Additional Notes or Comments