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>