Commit Graph

63 Commits

Author SHA1 Message Date
Robin Kuss f18ee228e8 spec: add quiz_lti contract test info for enrollment
Closes: QUIZ-6655

Test Plan:  See https://gerrit.instructure.com/#/c/quiz_lti/+/204264

Change-Id: If2fe159ec156675c00cb90043b9a6733d60a7941
Reviewed-on: https://gerrit.instructure.com/204274
Tested-by: Jenkins
Reviewed-by: Tyler Burraston <tburraston@instructure.com>
QA-Review: Tyler Burraston <tburraston@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2019-08-08 16:23:58 +00:00
Ben Nelson fd1dff30b6 spec: Add provider state for new QuizLTI contract test
Change-Id: If5f315fba6937e0d07d981846c6f3e423f22ac87
Reviewed-on: https://gerrit.instructure.com/202068
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Jenkins
2019-07-24 16:02:29 +00:00
Marc Phillips cbccd7faa8 Send LiveEvents using PutRecords
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>
2019-07-03 20:03:16 +00:00
Robin Kuss fe9e2e6768 update quizzes next quiz dupicated contract
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>
2019-05-06 19:43:42 +00:00
James Williams 7b5cd50480 add not-null constraint to account notifications user_id
refs #CORE-2562

Change-Id: I4b01274abaf131d0fed550a735099d84588a7818
Reviewed-on: https://gerrit.instructure.com/184912
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-03-15 18:58:13 +00:00
Marc Phillips d946966f3a Remove DeveloperKey Management and Scoping FF
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>
2018-10-26 15:16:36 +00:00
Kausty Saxena e486e0a6ef Add Android consumers
closes: MBL-11461

Test Plan:
QA-CR

Change-Id: I1c816661185886de5e884fff87c38400baedb8c5
Reviewed-on: https://gerrit.instructure.com/168072
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2018-10-19 16:38:00 +00:00
Michael Hargiss a40b0515c9 add parent user for contract tests
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>
2018-10-16 19:34:37 +00:00
Robin Kuss faf38b6095 update quizzes next contract for started at value
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>
2018-10-03 14:27:46 +00:00
Derek Bender 0ef142a374 Spec: mark failing contract spec as pending
Change-Id: Ic945b45d3c44ff96c1013914ec95154b3292a32e
Reviewed-on: https://gerrit.instructure.com/166492
Tested-by: Jenkins
Reviewed-by: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Dariusz Dzien <ddzien@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Reviewed-by: David Tan <dtan@instructure.com>
2018-10-02 00:07:34 +00:00
Robert Lamb eb2351a7cc spec: add FIU as external consumer
Change-Id: I528b5760eda65e2e82ca258716b0a39a54d66cfa
Reviewed-on: https://gerrit.instructure.com/166135
Tested-by: Jenkins
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-09-28 18:54:10 +00:00
James Williams cd45a464fa don't re-copy quizzes.next assignments
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>
2018-09-20 19:41:35 +00:00
Tucker McKnight 37a59a4b31 spec: Add sis_user_ids to users created in base provider state
Change-Id: I95bf9f04afef11a14e1aad282efadc94cef58be5
Reviewed-on: https://gerrit.instructure.com/163694
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-09-11 18:16:08 +00:00
Robin Kuss a810d9d464 assignment clone contract test with quiz_lti
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>
2018-09-10 15:59:45 +00:00
Robin Kuss 29bf0b577f quiz_export_complete live event contract test
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>
2018-08-23 15:06:45 +00:00
Luke Kingsley 9515e732fa spec: wiki page spec
Change-Id: I6c0fb7fe65a04a74ac630b4f4cdac555399aee13
Reviewed-on: https://gerrit.instructure.com/157722
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-08-03 18:26:06 +00:00
Eka Tjung 46b44fcf50 spec: Add pact states
Add grading standards and assignment with override state.

Change-Id: Ifc576c2e7111afd67c95685a936cfef922d800fe
Reviewed-on: https://gerrit.instructure.com/159382
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
2018-08-01 22:35:20 +00:00
Robert Lamb ae921cbd24 spec: Add list of external pact consumers
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>
2018-07-30 18:51:52 +00:00
Deepeeca Soundarrajan 34ed5167e7 spec: Add planner spec for contracts tests
Test Plan:
  -- passes Jenkins

Change-Id: I4a79751cfde033217719f7beb319442f65096166
Reviewed-on: https://gerrit.instructure.com/157806
Reviewed-by: Tucker McKnight <tmcknight@instructure.com>
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Product-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
2018-07-20 21:52:33 +00:00
Deepeeca Soundarrajan 46832c19dd Add git sha to CanvasAPI provider version number
Closes #QA-552

Test Plan:
 -- Passes Jenkins

Change-Id: If1e5cd8467516e609eaac1ce07bb9ec5788fc171
Reviewed-on: https://gerrit.instructure.com/157880
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-07-19 21:45:31 +00:00
Robin Kuss 70ffe9a773 content migration CCI contract tests
Fixes: QUIZ-4638

Test Plan:  See: https://gerrit.instructure.com/156787

Change-Id: I71b525cdb46f952161e9d6b183d2230856cbac60
Reviewed-on: https://gerrit.instructure.com/156789
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2018-07-16 19:06:38 +00:00
Luke Kingsley bea986b5e1 spec: Add discussion pact test
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>
2018-07-11 21:41:06 +00:00
Deepeeca Soundarrajan 837630ab2f Change the pact provider version
Test Plan:
  --Passes Jenkins

Change-Id: Ic5619f40a3691f85db9beae6d7a24276da919c85
Reviewed-on: https://gerrit.instructure.com/157019
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-07-11 21:24:48 +00:00
Luke Kingsley bbaa102b5f spec: Add authorization test
Test Plan:
1. Pass Jenkins

Change-Id: I0b5c39d6e36fbe52b87f7d0d45178362f7b73ee9
Reviewed-on: https://gerrit.instructure.com/156407
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-07-10 20:13:42 +00:00
Luke Kingsley 67c9d639a7 spec: add comments to base state
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>
2018-07-10 20:13:35 +00:00
Luke Kingsley 49cf468a73 spec: Refactor wiki page spec
Test Plan:
1. Pass Jenkins

Change-Id: I3f87bb6e429bf244ecdf8d4dabe7edd6367d8fb7
Reviewed-on: https://gerrit.instructure.com/156655
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-10 18:00:12 +00:00
Luke Kingsley 98ac0f8563 spec: refactor discussion spec
Test Plan:
1. Pass Jenkins

Change-Id: Ie6b3703f1fff0b6a0da7ac0b3b8885a1395687e8
Reviewed-on: https://gerrit.instructure.com/156731
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-10 16:47:23 +00:00
Luke Kingsley d1dc057f72 spec: fix assignment specs
Test Plan:
1. Pass Jenkins

Change-Id: I187f1a4c0bbcc90538b71640b8a125885c6257eb
Reviewed-on: https://gerrit.instructure.com/156349
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-07-06 16:59:05 +00:00
Robin Kuss 4cd8fa4e42 add provider states for quiz assignments for migration
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>
2018-07-06 16:28:58 +00:00
Luke Kingsley 2fa9fdf3f6 spec: Comment base provider state
closes QA-528

Test Plan:
1. Pass Jenkins

Change-Id: I7ec871711e9a7bbd63416af5213cc0e97c2f8003
Reviewed-on: https://gerrit.instructure.com/156139
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-06 14:24:17 +00:00
Luke Kingsley 2888cd772b spec: refactor calender specs
closes QA-528

Test Plan:
1. Pass Jenkins

Change-Id: I3bf6c3bb855c7618e5c25f05d04e2a040a26e0c4
Reviewed-on: https://gerrit.instructure.com/156104
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-06 14:24:09 +00:00
Luke Kingsley 1c1acbfaee spec: refactor users specs
closes QA-528

Test Plan:
1. Pass Jenkins

Change-Id: I157f98d8066b4c3030b59fb9aa75889c698b6434
Reviewed-on: https://gerrit.instructure.com/156138
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-07-05 22:31:31 +00:00
Luke Kingsley d355b0a7bd spec: refactor courses specs
closes QA-528

Test Plan:
1. Pass Jenkins

Change-Id: I997655b18d52216c2c0fe8879110712a735b8458
Reviewed-on: https://gerrit.instructure.com/156134
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-07-05 22:26:34 +00:00
Luke Kingsley e48a4d08bd spec: refactor reports specs
closes QA-528

Test Plan:
1. Pass Jenkins

Change-Id: I3fe7142d0a5d7527f3c30a78e995f094ac69068b
Reviewed-on: https://gerrit.instructure.com/156097
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-05 16:41:49 +00:00
Luke Kingsley 879f7e95f9 spec: refactor announcement specs
closes QA-528

Test Plan:
1. Pass Jenkins

Change-Id: Ie272d7694d9d761b6cb59f13ce5eb111330f70b9
Reviewed-on: https://gerrit.instructure.com/156087
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-07-05 15:40:15 +00:00
Luke Kingsley dd081636d2 spec: refactor notifications specs
closes QA-528

Test Plan:
1. Pass Jenkins

Change-Id: Ic2f1866084cbbfc1f79557c7ee40656ceaf3d063
Reviewed-on: https://gerrit.instructure.com/156095
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-07-05 15:37:18 +00:00
Luke Kingsley 28f2d64b1d spec: refactor assignment specs
closes QA-528

Test Plan:
1. Pass Jenkins

Change-Id: I0d084b9563e603616ebcd0fa2d551232a9f380c3
Reviewed-on: https://gerrit.instructure.com/156082
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-07-05 15:19:02 +00:00
Luke Kingsley bce0b82015 spec: refactor pact tests
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>
2018-07-03 16:08:39 +00:00
gbeckmann 4d3dc28d7d Revert "Remove import_quizzes_next feature flag"
This reverts commit a664cdb0b2.

Fixes QUIZ-4871

Change-Id: I7bb26a6cf03f4442f384bd40d4ed612b060012bb
Reviewed-on: https://gerrit.instructure.com/155719
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Han Yan <hyan@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
2018-06-29 00:39:08 +00:00
Michael Hargiss fd18cc316b fix CCI contract test
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>
2018-06-28 21:56:36 +00:00
Michael Hargiss d0c464159b spec: modify course provider state
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>
2018-06-28 16:20:58 +00:00
Michael Hargiss 9e3de1c6ec spec: add base provider states for contract tests
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>
2018-06-28 02:09:08 +00:00
Tucker McKnight f93a0149ed spec: Make Auth-User header specify a user by name, not ID
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
2018-06-27 23:00:13 +00:00
Tucker McKnight 98aa24d0cd spec: Don't automatically insert Authorization header
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>
2018-06-27 22:43:59 +00:00
Tucker McKnight 3db851750d spec: Reset DB counter in set_up, not tear_down
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>
2018-06-26 18:48:35 +00:00
Steve Kacsmark a664cdb0b2 Remove import_quizzes_next feature flag
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>
2018-06-25 18:47:13 +00:00
Deepeeca Soundarrajan 6b37ec3836 Change customer tag to ENV variable
Test Plan:
 -- Passes Jenkins

Change-Id: Iab29a612ea6e0c5e06cc2add457b9321037becb6
Reviewed-on: https://gerrit.instructure.com/154843
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-06-22 18:59:24 +00:00
Tucker McKnight 787fb989db spec: Remove provider params from assignments pact
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>
2018-06-21 22:43:19 +00:00
Michael Hargiss 797c3918b0 add content_migration_completed contract test
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>
2018-06-20 20:33:48 +00:00
Luke Kingsley 70df414d1b spec: Added new tests for the course api endpoint
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>
2018-06-20 20:29:17 +00:00