Commit Graph

124 Commits

Author SHA1 Message Date
Joe Hoag c0325eb466 spec: New Pact provider state for mobile assignments, submissions
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>
2020-03-24 20:00:27 +00:00
Joe Hoag b2d1c04365 spec: MBL-13983: Enabling android pact verification
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>
2020-02-19 19:39:30 +00:00
Joe Hoag c1c97cb53f spec: MBL-13808: Initial provider state for mobile
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>
2020-02-13 15:41:36 +00:00
Brian Watson 5ca1d89f90 Adding live events contracts for outcomes service
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>
2020-01-10 21:14:17 +00:00
Tucker McKnight cf928b37cd spec: allow a tool to to hit LTI API in a provider state
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>
2019-11-13 17:49:20 +00:00
Tucker McKnight 40dac24451 spec: Make the developer key grant "show feature flags" permission
test plan:
- tests pass

Change-Id: I4126ca3ef146358fd630eabe29da2682c44bd7af
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215958
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2019-11-05 22:34:35 +00:00
Tucker McKnight de87b5b7db spec: Allow expired JWTs to be used in contract tests
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>
2019-10-30 19:32:40 +00:00
Tucker McKnight b8a19c6da5 spec: Create a provider state for OAuth requests
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>
2019-10-22 19:02:38 +00:00
Marc Phillips 4322a8e0b7 Fix Pact Tests for Live Events
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>
2019-09-10 19:52:38 +00:00
Caleb Guanzon 6b6c8e0c9e remove lor external tools
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>
2019-08-23 18:23:52 +00:00
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
Rohan Cheeniyil 37aba08321 refactor code for provider states based on endpoints
test plan:
* checkout patch and make sure pact can verify

Change-Id: Ib8e51b628b7c8d7caab92f267badcee6a1bd9979
Closes: QA-520
Reviewed-on: https://gerrit.instructure.com/154259
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
2018-06-19 16:38:02 +00:00
Rohan Cheeniyil 7e13486dda fix: account notification spec provider state
accountid used instead of userid and variable names fixed

Change-Id: Iecd786dd44dff85077d97ba4cf383c391ead3d26
closes: QA-512
Reviewed-on: https://gerrit.instructure.com/153980
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Tested-by: Jenkins
2018-06-15 16:32:43 +00:00
Robert Lamb 3965dc7781 spec: separate pact_config files
Seperate pact_config files for Canvas project and Generic Consumer
sub-project.

Change-Id: I9343c9f1137d0b0da6ef0c7880d502a8da85805a
Reviewed-on: https://gerrit.instructure.com/153889
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-06-14 22:07:08 +00:00
Rohan Cheeniyil b48799f43d spec: robust calendar spec
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>
2018-06-13 20:45:59 +00:00
Robert Lamb 19f57a4cbf spec: re-instate ability to verify pact locally
Allow verifying Generic Consumer pact locally by simply running
rake pact:verify

Change-Id: Ied8e64814899c4b632ce13fa36d45d7b49957f4f
Reviewed-on: https://gerrit.instructure.com/153655
Reviewed-by: Luke Kingsley <lkingsley@instructure.com>
Tested-by: Jenkins
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-06-13 18:05:55 +00:00
Luke Kingsley fef679230b spec: Added pact tests for users, announcements and courses
Added provider states and consumer side tests.

fixes: QA-502
Change-Id: I179d71722a0d176406072bc7941a80a2f8ff340c
Reviewed-on: https://gerrit.instructure.com/153174
Reviewed-by: Rohan Cheeniyil <rcheeniyil@instructure.com>
Tested-by: Jenkins
Product-Review: Luke Kingsley <lkingsley@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
2018-06-12 21:51:49 +00:00
Rohan Cheeniyil a46b7a7589 spec: account notification and report spec
Added account notification and report spec

Change-Id: I22228ab0f4f47713cf9ad759bd41bcf6f9cea704
Reviewed-on: https://gerrit.instructure.com/153102
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Reviewed-by: Anju Reddy <areddy@instructure.com>
Product-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
2018-06-08 20:30:41 +00:00
Rohan Cheeniyil 2dbab9b1ba spec: contract test and provider state for calendar_event endpoint
closes: QA-500

Change-Id: I7ece08c4befa0c08195bd1868c180d4b012af726
Reviewed-on: https://gerrit.instructure.com/152319
Tested-by: Jenkins
Product-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
2018-06-08 15:53:19 +00:00
Anju Reddy dd10968a22 wip: Add rake script to push results to broker
Test Plan:
  -- Passes Jenkins

Change-Id: I071c93e36414b80c32adbf3eba7f03bb5c0fff3f
Reviewed-on: https://gerrit.instructure.com/151510
Tested-by: Jenkins
Reviewed-by: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
2018-06-05 19:53:03 +00:00
Tucker McKnight 72bc724fb3 spec: Move generic consumer tests into pact folder
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>
2018-06-04 17:11:00 +00:00
Michael Hargiss 754c0197e9 add live event test for Quiz LTI contract
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>
2018-05-23 15:29:36 +00:00
Michael Hargiss 8568525f24 consolidate contract tests
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>
2018-05-18 22:34:20 +00:00
Michael Hargiss 89f287444a add contract testing readme
refs QUIZ-4175

Test Plan:
  - qa-cr

Change-Id: I8713c0dd007000037e774136ee37770eb90c9970
Reviewed-on: https://gerrit.instructure.com/149118
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
QA-Review: John Corrigan <jcorrigan@instructure.com>
2018-05-04 15:13:29 +00:00
Michael Hargiss 7293ebc942 add quiz lti contract tests for live events
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>
2018-04-10 14:20:18 +00:00