Commit Graph

124 Commits

Author SHA1 Message Date
Aaron Ogata 6123daa149 override pact-messages deprecated method usage
refs AE-92

Change-Id: Ied8ab23115c0ba0bbc6f0e3b672e56f2ad6c651c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307399
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-12-14 17:26:49 +00:00
Aaron Ogata 97dffd25ee introduce bootsnap
refs DE-1383

Change-Id: I6ab3efff2328717a74626a4fc2b4e171e41bcb06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-10-04 13:18:03 +00:00
balazs.szogi 72122ff5e5 spec: Remove Catalog Pact Contracts
flag=none

closes: PHO-3239

Testplan:
- Tests pass

Change-Id: Iee43261846f2f5b3c6dbdb658c94c2c55c59facd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/299838
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Bence Pjatacsuk <bpjatacsuk@instructure.com>
Reviewed-by: Peter Tircsi <ptircsi@instructure.com>
QA-Review: Bence Pjatacsuk <bpjatacsuk@instructure.com>
Product-Review: Bence Pjatacsuk <bpjatacsuk@instructure.com>
2022-09-02 19:45:36 +00:00
Mark McDermott f601523568 spec: Remove Quizzes Pact Contracts
flag=none

closes: hQUIZ-9907

Testplan:
- Tests pass

Change-Id: Iadb81f393c2dd15147a83f7edeed5f2fd586af8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/299740
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Build-Review: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Mark McDermott <mmcdermott@instructure.com>
2022-08-30 02:59:30 +00:00
Jonathan Guardado 56405bfc9f Fix: Publishing a course sets the course start date
Keep start_at nill when publishing a course

closes: LS-3150
flag= none

Test plan:

Prerequisite: A course without a course start date set

- Publish the course.

- Selecting Course from the Participation drop down, expect the start
date stays empty

- Check the course API and expect it also shows the "start_at" as
 nill

Change-Id: Ia3b474fd7eaef5a84b3595e2308cc05341b85354
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/291191
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2022-05-19 17:35:37 +00:00
Aaron Ogata 2f386d104a rename Canvas::DynamicSettings => DynamicSettings
Change-Id: Ia2c1754ce729d95bcbf194f6b31a5a2b36d42bbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282694
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-01-12 21:54:51 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer e73cf9ddf4 RuboCop: Style/HashSyntax
[skip-stages=Flakey]

auto-corrected

Change-Id: I9371a61046aee6b148f89dd434114a8ba2b1188c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:02:35 +00:00
Cody Cutrer eaca556b81 RuboCop: Style/NumericLiterals
[skip-stages=Flakey]

auto-corrected

Change-Id: I88363d87d5a70be941aa81b4ffe5306ce7506b98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279207
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-24 23:31:34 +00:00
Cody Cutrer c302dd8bc1 RuboCop: Style/SymbolArray, Style/WordArray
[skip-stages=Flakey]

auto-corrected

Change-Id: Id187ed60c5590025e780d81b85b5212f51368f27
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279196
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 14:30:08 +00:00
Cody Cutrer ff99d18138 RuboCop: Style/RedundantSelf
[skip-stages=Flakey]

auto-corrected

Change-Id: I5f26ad1f8210a74c2198b514235d5134dcd0dae1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279070
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-20 16:41:21 +00:00
Cody Cutrer dbfd4d4de4 RuboCop: Style/TrailingCommaInArguments
[skip-stages=Flakey]

auto-corrected

Change-Id: I042349a67e1473a0db9b07e66e13c149e5c92b55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278845
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-19 22:22:20 +00:00
Cody Cutrer fd6b50710c RuboCop: Style/CaseLikeIf
[skip-stages=Flakey]

auto-corrected

Change-Id: I1f6b8a5f58a97a3ef17004ba9bf7a0940632dd55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278161
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-12 20:24:23 +00:00
Cody Cutrer a690e90aa8 RuboCop: Style/RedundantReturn
[skip-stages=Flakey]

auto-corrected

Change-Id: Ic472ca1cc04423fc966cd4a1ead467604d2904fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278130
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-12 16:33:45 +00:00
Cody Cutrer 6311053d81 RuboCop: Style/ColonMethodCall
[skip-stages=Flakey]

auto-corrected

Change-Id: I46f0ee2c3fb97f3ca37627c0edd8eecffaf0aa59
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277986
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-11 17:39:58 +00:00
Cody Cutrer cf213ee24b RuboCop: Style/RedundantFreeze
[skip-stages=Flakey]

auto-corrected

Change-Id: Id1b8bafdd744219a4797e6e1ba5891cd7ce4bccd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277888
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-11 02:06:47 +00:00
Cody Cutrer 7fdf9d7588 RuboCop: Lint
[skip-stages=Flakey]

the balance. mostly. Lint/UriEscapeUnescape is put in the pending
block because it's so touchy, and I didn't want to deal with it
right now

all manual

Change-Id: Ibeb81e013f56f160d51f7d237a9bcfe98daa1e53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277569
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-09 21:42:31 +00:00
Cody Cutrer 3474d36533 RuboCop: Lint/DuplicateBranch
all manual

Change-Id: Iafce1417d95b0d590774f55c769f2abeb139ea96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277367
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2021-11-04 20:02:10 +00:00
Cody Cutrer 6cb0ea010c RuboCop: Lint/UselessAssignment spec
[skip-stages=Flakey]

all manual

Change-Id: I615934f94060ed339c17d6a73599487dc577e376
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276433
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-21 13:38:12 +00:00
Ethan Vizitei 015d7abc62 inflect OAuth for zeitwerk
refs FOO-2476
flag=none

TEST PLAN:
  1) specs pass

Change-Id: I9f73e0021f5efec2be3c2f419e758baf00e6914f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275642
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-13 16:32:05 +00:00
Cody Cutrer dbd8c46655 RuboCop: Lint
[skip-stages=Flakey]

auto corrections applied:
 * Lint/AmbiguousOperator
 * Lint/AmbiguousOperatorPrecedence
 * Lint/AmbiguousRegexpLiteral
 * Lint/DeprecatedClassMethods
 * Lint/DeprecatedOpenSSLConstant
 * Lint/NonDeterministicRequireOrder
 * Lint/ParenthesesAsGroupedExpression
 * Lint/RedundantRequireStatement
 * Lint/RedundantSafeNavigation
 * Lint/RedundantSplatExpansion
 * Lint/RedundantStringCoercion
 * Lint/RedundantWithIndex
 * Lint/SendWithMixinArgument
 * Lint/SymbolConversion

Change-Id: I222ec19978033544513bb99755994d109435abad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274551
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-29 03:38:23 +00:00
Cody Cutrer 6b0095610c RuboCop: Layout spec
[skip-stages=Flakey]

Change-Id: Id479617328562fd009f00db27f248c2ebafa4b7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274151
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2021-09-22 22:40:24 +00:00
Evan Battaglia cc27686aeb Prevent creating LE Kinesis client from hanging
Creating a Kinesis client with no creds causes the AWS gem to reach out
to an AWS-internal IP (169.254.169.254). There is a connect timeout of 1
second but this is disabled in
config/initializers/no_timeouts_debugging.rb. As a result, creating a
Kinesis client can indefinitely hang, making Canvas completely unusable.

The issue is made worse by recent changes which turned Live Events on
with such invalid config for anyone who used config from
dynamic_settings.yml, whereas previously, Live Events had to be manually
turned on via a plugin.

This change prevents invalid configs from reaching the Kinesis client;
except in prod in case anyone is actually using the feature whereby
AWS looks up creds on the internal IP (and to avoid any possible
slowdowns by checking for the settings repeatedly).

Additionally I made NoRaiseTimeoutsWhileDebugging log a message when a
timeout happens, which would have greatly helped with debugging this
issue.

refs INTEROP-7016
flag=none

Test plan:
- Have config in dynamic_settings.yml like the old
  dynamic_settings.yml.example, with live-events config but no creds,
  e.g.:
        live-events:
         aws_endpoint: http://kinesis.canvaslms.docker
         kinesis_stream_name: live-events
- From a rails dev console run LiveEvents::Client.config. It should
  return nil.
- Run Canvas and make sure you can login, view a course, etc. -- just
  try anything that emits a live event (almost anything)
- Add aws_access_key_id and aws_secret_access_key_dec from from
  dynamic_settings.yml.example into your dynamic_settings.yml
- From a rails dev console run LiveEvents::Client.config. It should
  return the config.
- From a rails dev console run `LiveEvents::Client.new`. It should
  immediately produce a client.
- Restart Canvas and make sure you can view a course, etc.

Change-Id: I9a325b7f30c8e0203c2903a25a1f0139776b3f1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271907
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-08-23 22:19:44 +00:00
Aaron Ogata 3dbf596e03 convert contract tests to EKS-compatible syntax
refs DE-707

Change-Id: I0d823124c25b879ff3c572240720f39ba9371909
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267009
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-06-15 13:57:51 +00:00
Han Yan 416a756d0f retire import_to_quizzes_next FF
closes QUIZ-8257

flag=quizzes_next

test plan:
- enable/disable quizzes_next, on Import Content page,
  "Import assessment content as New Quizzes" option will
  be shown/hidden

Change-Id: Ie0b88f1a3940a34512e0627e593258ddf100deb8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261928
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
2021-04-05 14:39:23 +00:00
Brian Watson 6651cd10fe Remove public contract tests
We found that the external pact broker hasn't been used in over 2 years,
so there isn't a justifiable reason to keep these running

Test-plan:
- Verify that contract tests still run for internal customers
- Verify that post-merge, generated contracts are still pushed
   to the broker

Change-Id: I8221dbf97eb78610ef2b25a69e32909b7f29b6c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260350
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2021-03-10 19:41:39 +00:00
Ethan Vizitei 6816e36902 pull canvas::security out into a gem
refs FOO-1648
flag=none
[fsc-propagate=false]

move general module code to "gems"
along with specs.

Leave shim in canvas to avoid breaking
things while callsites get changed.

change some limited callsites
from Canvas::Security to CanvasSecurity
that were doing spec stubbing that required
at least one namespace change anyway

generate readme describing common use
cases.

TEST PLAN:
  1) security operations continue unimpeded.

Change-Id: Ia2d102d5038e2f5d0bb24201e38894e12b73063e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259540
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-03-02 20:58:55 +00:00
Brian Watson 2a499a637a spec: correct outcome content_export contract test
flag=none

Test-plan: - Tests pass
Change-Id: I6f7897dec040496dcdf923cbcb23efaca6653b95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259451
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2021-02-26 18:24:09 +00:00
Brian Watson 9f1c78743f spec: add contract tests for prof ratings + calc method
refs OUT-4041

flag=account_level_mastery_scales

Test-plan: - Ensure this PS is rebased after g/258359 merges
 - After g/258397 is merged in outcomes-service,
   retrigger a build and verify that new contracts are
   published and that these new specs verify them
Change-Id: Id86fcdad5830cac0ea1e648bbb08c15afeba2325
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258398
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2021-02-16 20:04:03 +00:00
Brian Watson cca5710c7b spec: re-enable live events contract tests
refs INTEROP-6100
refs OUT-4041

flag=none

Test-plan:
 - retrigger a couple of times, contract tests pass

Change-Id: I0930d73d41dba8561a9ea578bbd0c0f09ada7362
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258359
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
2021-02-10 19:40:20 +00:00
Tucker McKnight cb83a398dd spec: Run live events specs if an env var is set
All are being skipped for now due to flakiness, but we'll want to
be able to run them in a separate job.

Change-Id: I2389d826a4161bee4a3678a67f8fbd1596a5f521
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252314
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2020-11-10 00:31:34 +00:00
Aaron Ogata 624c3b452e skip more flakey specs
refs INTEROP-6100

Change-Id: I41a4501a3e94f378b93e336eae9df8bd54e0d6f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251980
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-11-05 16:53:58 +00:00
Cody Cutrer f2a9c756f1 update to inst-jobs 1.0 via shims
Change-Id: Id39b1e8d3bebcc0f9b7ded920b450f275565f708
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250923
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-10-28 13:46:49 +00:00
Cody Cutrer 81d0bbc465 add # frozen_string_literal: true for specs
Change-Id: Id508bec1817937b1c24c29f1db7221e09cb9c2ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251157
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:48:35 +00:00
Alex Slaughter a7f36dbadd Update Contract Test Documentation
Test Plan:
 - Specs Pass

Refs: QUIZ-7892
flag = none

Change-Id: I4827407a3adaa1934dd64ac4c325b7ca1721cfc9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250190
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark McDermott <mmcdermott@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2020-10-19 21:58:45 +00:00
Evan Battaglia fb31580b15 Have a dummy account in tests
Having the dummy root account (ID = 0) always there in
our test environment makes the test environment more closely
match prod.

test plan:
- specs pass

fixes INTEROP-6158

Change-Id: I58d6ec7e19c4ab4ebf5c2d5b3a38ecee0f047e7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246942
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2020-09-21 18:32:02 +00:00
Jared Crystal 50f064db97 spec: unskip and fix flaky AuditLog specs
fixes DEMO-41
flag = none

test plan:
 - tests pass consistently without flake

Change-Id: Ibeb11c5a5beebfcb94ff7544bd110751c478038e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247679
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Jared Crystal <jcrystal@instructure.com>
2020-09-17 14:21:55 +00:00
Brian Watson 0cb4e6418f Push canvas-as-a-consumer http contracts to pact broker
flag=none
closes OUT-3903

Note: Pact and FSC don't play nicely when generating contracts
since Pact thinks that a new FSC run of a request+state pair
is trying to override something unintentionally

FSC_REPEAT_FACTOR='1'

Test-plan
 - verify that contract tests run
 - (post-merge): verify that contracts are pushed to inseng broker

Change-Id: Ic856bf6b506a00a921e9b1dd6add6dc1bdd105bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246265
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2020-08-31 17:49:08 +00:00
adam.lenning a0c8151ca1 Add canvas_lms as a consumer
closes OUT-3752
flag=none

FSC_REPEAT_FACTOR='1'

Test-plan:
 -tests pass, verify new tests run

Change-Id: Iccf54743d4a6206c5b593bc94523544cb4dc3480
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242528
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2020-08-27 18:24:30 +00:00
Ryan Norton ae75afe063 skip flaky live events specs
flag = none
refs INTEROP-6100

Change-Id: If7e69f25a43fc63da8b0d7be3384e43181c287a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245410
Tested-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2020-08-18 21:00:22 +00:00
Drake Harper 6d2e121d6b Remove student planner feature flag
Test plan:
-verify planner is always enabled when a student has an enrollment

flag=none

fixes VICE-331

Change-Id: I6ffb90de94737d01afbac36eee0f36a967ace179
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242462
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-07-23 18:59:09 +00:00
wdransfield 0dfd45614c Keep root_account_ids updated on users
Closes PLAT-5801
flag=none

This change keeps the root_account_ids column
updated on the users table. Updates to this
column are triggered whenever a record in the
user_account_associations table is created,
updated, or destroyed.

Test Plan:
This test plan assumes you have MRA and at least
two shards set up.

1. Create a user and associate them with the root
   account in Shard 1
2. Run jobs
3. Verify root_account_ids on the user is now an
   array of size 1 containing the global ID of
   the Shard 1 root account
4. Associate the same user with the root account
   of shard 2 (one way to quickly do this is by
   using User#associate_with_shard)
5. Run jobs
6. Verify root_account_ids on the user is now an
   array of size 2 containing the global IDs of
   both the Shard 1 and Shard 2 root accounts
7. Set the "sync_root_account_ids_on_user_records"
   Setting to something other than "true":
   ```
   Setting.set(
     "sync_root_account_ids_on_user_records",
     "false
   )
   ```
8. Create a new user in an account
9. Run jobs
10. Verify root_account_ids is still nil
    for the new user

Change-Id: Ia4b6552b887f58a85bc368312234db4da2237058
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238830
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2020-07-06 16:32:45 +00:00
Joe Hoag 63664b6d2e spec: Add provider state for mobile pact testing
spec: Add "mobile courses with discussions" provider state.  This
will allow mobile pact testing related to discussion apis.

closes MBL-14340

Test Plan: Ensure that the mobile discussion pact tests
pass against this new provider state.

Change-Id: Ie924218b8e0e72740cdba5194d3b601407cdb28c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241528
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: KC Naegle <knaegle@instructure.com>
QA-Review: Joe Hoag <jhoag@instructure.com>
Product-Review: Joe Hoag <jhoag@instructure.com>
2020-07-01 16:08:30 +00:00
Michael Brewer-Davis 1bbd60bd8c spec: compare live events contract with matching event
Change-Id: I004ee8556b13daa18572d0c1fbe32eb04d47fbc0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240112
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-06-15 15:38:38 +00:00
Joe Hoag 176d53f887 spec: Add mobile provider state for conversations
spec: Added 'mobile user with conversations' provider state.

closes MBL-14235

Test Plan: Verify that new mobile Pact conversations
api tests pass against the new provider state.

Change-Id: If7daa1348a32896e48c497f06e7c079e534cc036
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/237740
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Joseph Hoag <jhoag@instructure.com>
2020-05-18 21:52:21 +00:00
August Thornton b67d8f02ab improve Pact build times in Jenky
closes USERS-523
flag = none

test plan:
 * builds should pass

Change-Id: Id34d85e58f6dc693b8a6ffca37d08d838562daec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235344
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2020-05-15 15:35:24 +00:00
Joe Hoag 6b2bd580af spec: Add groups pact provider state for mobile
spec: Added a 'mobile courses with groups' provider
state to allow for mobile/android pact testing of
group API endpoints.

closes MBL-14234

Test Plan: Make sure that new group-related pact tests
pass when run using the new provider state.

Change-Id: If33430057098f56f72f0200d2f2bb24339c71684
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236335
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-05-05 20:38:15 +00:00
August Thornton 630721d212 spec: add Catalog consumer to Pact contract test suite
closes USERS-436

test plan:
 - requires a pact contract in local or public broker
 - execute tests against Pact files
 	- run `bin/contracts-verify-live-events`

Change-Id: I847787780e1bc4e5024e0cd2c46001dac6e31dfa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230402
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
2020-04-20 20:38:18 +00:00
Joe Hoag d34f0c961b spec: Add pact provider state for mobile quizzes
spec: Added 'mobile course with quiz" provider state.

closes MBL-14171

Test Plan:
- Ensure new mobile quiz-related pact
  contracts pass against new provider state.

Change-Id: Icc8b308f49d2d43a9727a4fda666b47040437e9f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233369
Reviewed-by: Andrew Cobb <acobb@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Joseph Hoag <jhoag@instructure.com>
Product-Review: Joseph Hoag <jhoag@instructure.com>
2020-04-08 20:40:36 +00:00
Andrew Cobb a70a90180a spec: add discussions provider state for canvas-ios
test plan:
All pact tests should pass

Change-Id: Ie2b79c710bfe82cecb0e0e0ff5302fb8477d956d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231699
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Joseph Hoag <jhoag@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Andrew Cobb <acobb@instructure.com>
Product-Review: Andrew Cobb <acobb@instructure.com>
2020-03-27 17:12:00 +00:00