spec: Created 'mobile 3 assignments, 3 submissions'
Pact provider state for mobile to test against.
closes MBL-13409
Test Plan:
--Ensure that our mobile pact tests for assignments
and submissions pass against this new provider
state.
Change-Id: Iefd9bb4afc1adfa6c76dbfb66e951e3db2758951
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231218
Tested-by: James Butters <jbutters@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Joseph Hoag <jhoag@instructure.com>
Product-Review: Joseph Hoag <jhoag@instructure.com>
spec: Enabling android pact verification
Enabling canvas-lms to verify against android pact
tests on every commit.
closes MBL-13983
Test Plan: If normal PR tests pass, we should
be good to go.
Change-Id: Ic46bb11165dabd2046ee6b98001c937456e946a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227187
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Joseph Hoag <jhoag@instructure.com>
spec: Created initial provider state for mobile
fixes MBL-13808
Test Plan: I've been testing this against mobile
contracts locally, and everything passes.
Change-Id: Ie92c61feb1ce1614206c67b1212fa9f202073983
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226397
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Joseph Hoag <jhoag@instructure.com>
Product-Review: Joseph Hoag <jhoag@instructure.com>
Test Plan:
- After merging outcomes contracts (consumer), rebase
this PS and verify that the outcomes contract tests pass
in this build
refs OUT-3149
flag=none
Change-Id: Ic391859d52e4ec0640fa11c0b663f9f75b735f4c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222649
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
This stubs a few parts of our JWT verification process so that
an expired JWT can be used to make API calls when the contract
test build runs. The JWT still needs to be valid, aside from
the iat and exp timestamps, and should be signed with the key
in the live-events-lti repository.
test plan:
- Set up the live-events-subscription-service locally
- Run the contract tests for the live-events-lti repo
and save the generated JSON file somewhere
- In canvas-lms, run
rails pact:verify:at[./path_to_contracts.json]
- It should pass
fixes PLAT-5101
Change-Id: Iff5a6a91aa2ad9868511d3396c73d8225587f640
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/216596
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
This will make the ignore_expiration flag always be used when
decoding a JWT, so long as the 'a course with live events' provider
state is being used.
Also makes the proxy_app no longer override the Authorization
header if the contents look like a JWT (even if it's an invalid
JWT).
fixes PLAT-5062
Change-Id: Ib69bce4821502c8853f2dd566762f2cd88f95aef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215090
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
This will accept any incoming request for an oauth token
and respond with a newly-created developer key for the
default account.
refs PLAT-5032
Change-Id: Ice58d5d76bcd3212ae42a400c0305fada228ce5e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/214143
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
refs QUIZ-6827
Test Plan:
Running the pact tests that fail will not fail if all are run
Change-Id: I0779dfbb6b0547713eaa1a6d7595a7e7c9db07ff
Reviewed-on: https://gerrit.instructure.com/208095
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
fixes RD-4912
- removes lor_for_account logic
video: https://cl.ly/8150e0363891
test plan:
- make sure that installing commons, quizzes next, dig
or any app that has a global nav launch still completes successfully
without the need of having lor_for_account aka lor external tools
feature flag turned on
- make sure that the Lor External Tools feature
flag no longer exist in Account Settings Feature Options list
- make sure you can still launch an LTI app with a global nav launch
from the global nav
Change-Id: I0869fa359ca4ef92d69dd9fa6ce8be47c18dacc3
Reviewed-on: https://gerrit.instructure.com/206146
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Daniel Lee <dlee@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
closes PLAT-4549
Test Plan:
- Live events should only be sent in batches
Change-Id: I72f8e210ae74b32b09e16a8d4fb515e0c4f699fc
Reviewed-on: https://gerrit.instructure.com/197993
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
Fixes QUIZ-6415
Test Plan:
- Create new contract in quiz_lti (based on new PS for this
issue)
- Run contract verification for live events and verify
quizzes_next_quiz_duplicated_spec.rb spec succeeds.
Change-Id: Idbdae434a5b368cd60805407b2324b7e35f576c6
Reviewed-on: https://gerrit.instructure.com/192238
Tested-by: Jenkins
Reviewed-by: Han Yan <hyan@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
This does not remove the old dead code, just all the places
that checked to see if it was enabled.
closes PLAT-3752
Test Plan:
- Regression test on the developer keys page
- Also need to check that creating an oauth 2 token is
not broken (using client credentials)
Change-Id: I89983922a894ff7f20e86c034728d55284c8c668
Reviewed-on: https://gerrit.instructure.com/168271
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
Mobile is going to use this in their contract tests.
Test Plan:
- qa-cr
Change-Id: I30a753132dbd2545f7eb4d6c32e90ab620bf968c
Reviewed-on: https://gerrit.instructure.com/168123
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Reviewed-by: Kausty Saxena <ksaxena@instructure.com>
Fixes: CNVS-43910
Test Plan:
- all quiz_lti lives events test run successfully locally and in jenkins
Change-Id: I5a3a0ba9034269ebed3557b3dcfee98e0c7515e4
Reviewed-on: https://gerrit.instructure.com/166682
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
test plan:
* quizzes.next assignments should not trigger duplication
for pre-existing copies even when a full course copy
or blueprint sync is made
closes #ADMIN-1465
Change-Id: I7de141d37780f00ce85afbc8fc29d22b40cc4e1c
Reviewed-on: https://gerrit.instructure.com/164995
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Fixes: QUIZ-4365
Test Plan:
Validate new quiz_lti contracts for assignment update with quiz_lti PS
and local pact broker.
Change-Id: I14d90e7f0135558a3fd2ace94e4e3b19c1cba3a1
Reviewed-on: https://gerrit.instructure.com/163572
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
Fixes: QUIZ-4399
Test Plan: See https://gerrit.instructure.com/161182
Change-Id: Ia4090ecacadd8e5aea80499870e28403b721029e
Reviewed-on: https://gerrit.instructure.com/161184
Reviewed-by: David Tan <dtan@instructure.com>
Tested-by: Jenkins
QA-Review: Sven Thirion <sthirion@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
Add list of external pact consumers to use when pulling from
external pact broker. The pact.verify rake task fails deep
inside pact code if it can't find a pact file it's expecting.
Change-Id: I61f17d83812a4f5658887b7cf3c0d85fd66d4ae1
Reviewed-on: https://gerrit.instructure.com/158976
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Added a test to hit the delete endpoint
Test Plan:
1. Pass Jenkins
Change-Id: Ib39bdc7abcb94f00ec2bfb17d71c43d4e1e3d341
Reviewed-on: https://gerrit.instructure.com/156932
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Test Plan
1. Pass Jenkins
Change-Id: I6c430220d9fd2e36c791df794a33920def2ca970
Reviewed-on: https://gerrit.instructure.com/156415
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Refs: QUIZ-4638
Test Plan:
See test plan in https://gerrit.instructure.com/156235
Change-Id: Iebc7e089d284174f64ed4a4feb2e50973a202656
Reviewed-on: https://gerrit.instructure.com/156350
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
closes QA-523
Test Plan:
1. Pass Jenkins
2. Checkout and verify all tests are passing
Change-Id: Ief9ac43fdb328c8cd4c6f357eac2b640b8e15c92
Reviewed-on: https://gerrit.instructure.com/155784
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
refs QUIZ-4638
We tried using simple values like '1' for course uuid and
lti_context_id, but Canvas won't serve API requests that point to
/api/v1/courses/uuid:1/quizzes/1, therefore we'll have to use
legitimate uuid values in order to verify the Quiz LTI contract
tests.
Change-Id: I8bed6fa32c15b7fc80adf203182e6abb61a2e587
Reviewed-on: https://gerrit.instructure.com/155672
Tested-by: Jenkins
Reviewed-by: David Tan <dtan@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
A small change for a new Quiz LTI contract test.
refs QUIZ-4638
Change-Id: Ibd45eb4a52ce1d9a5d75e24883ecfeb2591ab65e
Reviewed-on: https://gerrit.instructure.com/155566
Tested-by: Jenkins
Reviewed-by: David Tan <dtan@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
refs QUIZ-4638
With a "base" provider state we can easily manage any number of
provider states from which all other provider states will
inherit.
Change-Id: Ic92dcb4b4649d334abdc64c622f252b5ec5825b6
Reviewed-on: https://gerrit.instructure.com/155564
Tested-by: Jenkins
Reviewed-by: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
This removes the Auth-User-Id header and changes it with Auth-User,
which should contain the name of a user. A pseudonym is created for
that user, since users can't make API requests without a pseudonym.
The pact proxy will now raise an error if a user name is provided
and there is no user matching that name.
Also added some tests for the proxy.
Change-Id: I29b2dd2ff34f8250bdbd0dc92e7d023dc337e057
Reviewed-on: https://gerrit.instructure.com/155375
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
Instead, we'll only add an auth token if a dummy Authorization header
is already there. Then we'll update that with a valid auth token for
the user specified in the Auth-User-Id header.
If the Authorization header is present, but Auth-User-Id isn't, we
assume user ID 1.
closes QA-514
Change-Id: I02bdcec1bd432e2446236375eeded7853235af7c
Reviewed-on: https://gerrit.instructure.com/155190
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Tucker McKnight <tmcknight@instructure.com>
This avoids a problem where, if the tear_down doesn't happen (say, if
the process is aborted), things wouldn't have been reset for the next
run. By doing it in the set_up, we can always count on IDs starting
at 1 every time the tests run.
Change-Id: I90ab810c03ea7f153dabc40b346d92bb2a11726f
Reviewed-on: https://gerrit.instructure.com/155194
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Product-Review: Tucker McKnight <tmcknight@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
closes QUIZ-4547
Test Plan:
- Enable Quizzes.Next in Canvas
- Enable Quizzes next for the course.
- Browse to Courses -> Settings -> Import Course Content
(/courses/<course_id>/content_migrations)
- For Content Types 'Common Cartridge 1.x package' and 'QTI.zip file'
- Import to Quizzes.Next Checkbox and help should be shown, and enabled
- Disable Quizzes next for the course.
- Browse to Courses -> Settings -> Import Course Content
(/courses/<course_id>/content_migrations)
- For Content Types 'Common Cartridge 1.x package' and 'QTI.zip file'
- Import to Quizzes.Next Checkbox and help should be shown, but disabled
- Disable Quizzes next in Canvas
- Browse to Courses -> Settings -> Import Course Content
(/courses/<course_id>/content_migrations)
- For Content Types 'Common Cartridge 1.x package' and 'QTI.zip file'
- Ensure the Import to Quizzes.Next Checkbox and help are not shown.
Change-Id: Ie04f94684c682db81dac721c7bb11b3d153e7e29
Reviewed-on: https://gerrit.instructure.com/154769
Tested-by: Jenkins
Reviewed-by: Jared Crystal <jcrystal@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
To avoid using our provider_params fork of pact, and to allow other
consumers (like quizzes) to start using Pact right away, this reinstates
our proxy for setting bearer tokens in requests.
To stop using provider params in a Pact test, tell it to expect the
header 'Auth-User-Id' to be present, with the value being the ID of
the user that you want to authenticate as. When the provider side runs,
that header will be changed to the 'Authentication' header, with the
value being that user's token.
You'll also need to set that header when making the request on the
consumer side, which is done by calling
`assignments_api.authenticate_as_user(user_id)`.
Other api_client files will need to extend api_client_base.rb -- I've
only done it for assignments.rb here. api_client_base.rb is what adds
the `authenticate_as_user` method. It also includes HTTParty, so that
doesn't need to be included in each api_client file now.
test plan:
- Pact tests should pass (both consumer side and provider side)
Change-Id: I20c28609745dd1609b59ef536a5ffdb85746e251
Reviewed-on: https://gerrit.instructure.com/154774
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Tucker McKnight <tmcknight@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
closes QUIZ-4753
Test Plan:
- checkout this commit locally alongside the associated quiz_lti
commit: https://gerrit.instructure.com/154482
You can use native canvas or docker canvas, either will
work.
- follow the instructions in canvas-lms/spec/contracts/README.md
to verify the new contract test passes
Change-Id: I77ba0425eb72164a7be7b11e9333092a03c9a507
Reviewed-on: https://gerrit.instructure.com/154484
Reviewed-by: David Tan <dtan@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Test Plan:
Checkout patchset and verify the tests are passing
Change-Id: I42a45466758f2ec12d504474d00694209e8ff2b7
Reviewed-on: https://gerrit.instructure.com/154321
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Adds a robust version of the claendar spec provider state
and potential fix for jenkins on account_notification
closes QA-510
Change-Id: Ie13fc56d4474a5c94636e95950695b97780accec
Reviewed-on: https://gerrit.instructure.com/153690
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
This also moves the pact_config.rb file into the pact folder.
The line filtering :pact tests has been removed from spec_helper.rb,
since rspec won't try to run them anyway now that they aren't in the
spec folder.
Change-Id: I1d8f27f4f30aa2cdc85e570deb7e0aa2cdb89c66
Reviewed-on: https://gerrit.instructure.com/152144
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Tucker McKnight <tmcknight@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
This adds a verification for the contract test between Quiz
LTI and the Canvas LMS Live Event, "quizzes_next_quiz_duplicated".
closes QUIZ-4398
Test Plan:
- follow the test plan outlined in the associated quiz_lti
commit (see JIRA ticket)
Change-Id: I0a755b3a1c39edde70dab5ab36f0fb91c0fbd32e
Reviewed-on: https://gerrit.instructure.com/151157
Reviewed-by: Tyler Burraston <tburraston@instructure.com>
Reviewed-by: Sven Thirion <sthirion@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Test Plan:
- follow the instructions in spec/contracts/README.md to run
the live events contract tests locally
- follow the instructions in
spec/contracts/service_providers/canvas_lms/README.md to run
the "Generic Consumer" Canvas API contract tests locally
Change-Id: I316747f53731f411ab82432587596e335c2fd059
Reviewed-on: https://gerrit.instructure.com/149766
Reviewed-by: Tucker McKnight <tmcknight@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
refs QUIZ-4175
Test Plan:
- qa-cr for now. A subsequent commit will include a comprehensive
test plan once the Quiz LTI contract test is published.
Change-Id: I2ffe962d8a626994614f3cc904d131e41e3a00b1
Reviewed-on: https://gerrit.instructure.com/145857
Tested-by: Jenkins
Reviewed-by: Mark Grant <mgrant@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>