-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Remove mongomock dependency from mongo provider and introduce MongoDbContainer testcontainer for testing. #53773
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
Conversation
1cd9ef4 to
5177598
Compare
6dbf921 to
686fd25
Compare
686fd25 to
11cadbc
Compare
shahar1
left a comment
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 :)
potiuk
left a comment
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 cool. First use of testcontainers :). We could likely migrate some of our integration tests to use testcontainers!
yeah offcourse thats on my list to get it :) |
…Container testcontainer for testing. (apache#53773) * Remove mongomock dependency from mongo provider * Fix mongo integration tests
…Container testcontainer for testing. (apache#53773) * Remove mongomock dependency from mongo provider * Fix mongo integration tests
closes: #51972
closes: #52547
pymongo is restricted due to mongomock, as mongomock no longer maintained we should remove this dependency.
In place of mongomock, i am introducing to use
MongoDbContainertestcontainer , this is working nicely, theMongoDbContaineris very light weight, after addingMongoDbContainerto tests are working fine , now the total time taking for mongo test approx 1min, i think this fine to considering the fact we dont have any other option to mock the pymongo and we are testing mongo against real client it gives more confidence :)Bumped pymongo to latest version.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.