-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 introducing contract testing #7172
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
🎨 introducing contract testing #7172
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7172 +/- ##
==========================================
+ Coverage 87.14% 87.20% +0.05%
==========================================
Files 1690 1683 -7
Lines 65625 65447 -178
Branches 1121 1121
==========================================
- Hits 57192 57072 -120
+ Misses 8113 8056 -57
+ Partials 320 319 -1
Continue to review full report in Codecov by Sentry.
|
sanderegg
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.
This looks pretty cool tool!
Please adjust the CI names and also the dependencies.
services/api-server/tests/unit/pact_broker/test_licensed_items.py
Outdated
Show resolved
Hide resolved
mrnicegyu11
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.
minors, thanks
services/api-server/tests/unit/pact_broker/test_licensed_items.py
Outdated
Show resolved
Hide resolved
pcrespov
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.
Nice work. Left some comments and suggestions .
services/api-server/tests/unit/pact_broker/test_licensed_items.py
Outdated
Show resolved
Hide resolved
services/api-server/tests/unit/pact_broker/test_licensed_items.py
Outdated
Show resolved
Hide resolved
bisgaard-itis
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.
Cool stuff. Someday you will have to explain me what exactly the advantage of the consumer driven contract testing is 😅, compared to using the openapi specs (which I guess is the provider driven 🤔).
services/api-server/tests/unit/pact_broker/test_licensed_items.py
Outdated
Show resolved
Hide resolved
services/api-server/tests/unit/pact_broker/test_licensed_items.py
Outdated
Show resolved
Hide resolved
GitHK
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.
waiting for other issues to be addressed.
Pleas take care into updating the javascript dependencies
sanderegg
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.
Please check the CI workflow name and file name. Thanks!
packages/models-library/src/models_library/api_schemas_webserver/licensed_items.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py
Show resolved
Hide resolved
|
7870cc8
into
ITISFoundation:master



What do these changes do?
licensed_resourcesfor public api #7284The consumer (Sim4Life) has unit tests running in its own CI. These unit tests use the Pact framework, which automatically generates a pact (contract) that defines the expected interactions with the provider (Osparc API Server). This contract is published to a Pact Broker container that we are hosting ourselves and is publicly available.
This PR introduces unit tests on the provider side. When these tests run, they automatically inform the Pact Broker of the last execution time and status. The Pact Broker URL will be added to the Batman slide/credentials page. These tests will be executed on each PR request.
Next steps: I have received four more contracts from the Sim4Life consumer, and I will add them.
Pact framework: https://docs.pact.io/pact_broker
Related issue/s
How to test
Dev-ops checklist