![]() Closes: CORE-1779 this is so we can not have to load all the possible courses on the Student planner on page load just so we can join them to course_ids From planner_item api responses to show course names for planner items. Because right now, for people that have many courses it is more Work to get all possible courses than it is to get the actual planner items. Test plan: * make a request to api/v1/planner_items, the returned response should include context_name and context_image for items That are linked to a context Change-Id: I69f8560f19b2a46bc94915d4a9e13623b518b291 Reviewed-on: https://gerrit.instructure.com/162035 Reviewed-by: James Williams <jamesw@instructure.com> Reviewed-by: Mysti Sadler <mysti@instructure.com> Tested-by: Jenkins Product-Review: Ryan Shaw <ryan@instructure.com> QA-Review: Ryan Shaw <ryan@instructure.com> |
||
---|---|---|
.. | ||
helper | ||
README.md | ||
account_notifications_spec.rb | ||
account_reports_spec.rb | ||
announcement_spec.rb | ||
assignments_spec.rb | ||
calendar_events_spec.rb | ||
courses_spec.rb | ||
discussions_spec.rb | ||
helper.rb | ||
planner_spec.rb | ||
search_spec.rb | ||
user_spec.rb | ||
wiki_pages_spec.rb |
README.md
Canvas LMS API "Generic" Contract Tests
Normally the Pact paradigm for contract testing is such that an API consumer publishes its Pact file for the API provider to verify. Canvas LMS has multitudinous API consumers, so in order to gain the most contract test coverage possible for consumers who choose not to publish a Pact file we've created a generic API consumer called "Generic Consumer". We write the contract tests for this generic consumer in the canvas-lms repo, generate its Pact file, and verify the Pact file in the same canvas-lms repo.
To follow the normal Pact paradigm to contract test real API and Live Event
consumers, see canvas-lms/spec/contracts/service_consumers/README.md
.
Running the generic contract tests locally
Running the contracts tests is a simple three step process:
- Generate the contract(s)
- Share the contract(s)
- Verify the contract(s)
Generate the Contracts
From the canvas-lms directory, run:
bin/contracts-generate
Share the Contracts
The pact file is already placed in canvas-lms/pacts/
for you.
Verify the Contracts
To verify the Pact file, run:
bin/contracts-verify-api
All specs should pass.
Publish the pact file to broker
bin/contracts-publish-api