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
[MAINTENANCE] Small refactor for tests that allows DB setup to be done from all tests #4012
[MAINTENANCE] Small refactor for tests that allows DB setup to be done from all tests #4012
Conversation
✔️ Deploy Preview for niobium-lead-7998 ready! 🔨 Explore the source changes: a53b495 🔍 Inspect the deploy log: https://app.netlify.com/sites/niobium-lead-7998/deploys/61e7148f8756d90007b61cee 😎 Browse the preview: https://deploy-preview-4012--niobium-lead-7998.netlify.app |
HOWDY! This is your friendly 🤖 CHANGELOG bot 🤖Please don't forget to add a clear and succinct description of your change under the Develop header in ✨ Thank you! ✨ |
@@ -104,25 +104,21 @@ class BackendDependencies(enum.Enum): | |||
"user_flow_script": "tests/integration/docusaurus/connecting_to_your_data/how_to_choose_which_dataconnector_to_use.py", | |||
"data_context_dir": "tests/integration/fixtures/no_datasources/great_expectations", | |||
"data_dir": "tests/test_sets/dataconnector_docs", | |||
"util_script": "tests/integration/docusaurus/connecting_to_your_data/database/util.py", |
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.
util_script
is not needed for data_connector 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.
🙇🏻
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.
LGTM! So simple, yet now it is so much clearer what the purpose of that function is.
Changes proposed in this pull request:
[DOCS] Migration Guide now includes example for Databases #4005 requires a util function that was previously only used by tests in the folder
docusaurus/connecting_to_your_data/database
, which loads data into a test DB. The "simplest" way to make sure the Migration Guide tests also had access to this function this involved making an additional copy of theutil.py
file, which we wanted to avoid.This is made slightly more complicated by the fact that test directories for Docusaurus integration tests are generated fresh for each test, and we don't have access to
great_expectations/tests/
directory within each test.This PR does two things.
load_data_into_test_database()
into thetests/test_utils.py
file where it can be accessed from all tests. In the process we also add a boolean flag that determines whether the full dataset or only the first 10 lines will be loaded into the test database (first 10 lines by default).test_script_runner.py
file + associated tests to use this new function.Previous Design Review notes:
Definition of Done
Please delete options that are not relevant.
Thank you for submitting!