Commit Graph

520 Commits

Author SHA1 Message Date
Brian Watson c40899dbd7 Add abililty to run selenium tests with axe assertions
flag=none

Test-plan:
- start up selenium
> dc exec web bash -c "ENABLE_AXE_SELENIUM=true bundle exec rspec
   <path/to/spec>"
- some failures should appear that are axe related for each failing spec
- using axe as a browser extension, reproduce the selenium tests
  by doing what the tests do. Run an axe check each time there is
  an expect in the spec
- verify that the rspec output matches the axe output (excluding
  color contrast) for the most part. The axe browser tool will probably reveal
  more issues than the selenium add-on which only asserts on certain rules.
- run multiple specs, verify that specs have distinct failures
  and that duplicate failures are filtered out
- after running multiple specs, ensure that the summary at the bottom of
  the rspec output is correct
- output should be easily readable both per spec and for totals at the bottom

Change-Id: I8b64a12568b6f1e6846df1fe8edb6a7a2d023d61
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245356
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
2021-03-05 16:19:26 +00:00
Ethan Vizitei 1f50a99cb8 de-circularize canvas redis methods
refs FOO-1636
flag=none

this helps ease the migration of caching
functionality into the canvas_cache
gem by unwinding circular references between
these modules.

Canvas now invokes Canvas::Redis, but
Canvas::Redis no longer invokes methods
on Canvas.

TEST PLAN
  1) caching continues to work the same in operational environments

Change-Id: I99a55a63def4fd01e6195f26ec69ae8f62d76314
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259424
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>
2021-02-24 21:40:28 +00:00
Cody Cutrer 160ff3c899 bump sanitize to latest
[fsc-max-nodes=12]
[fsc-timeout=60]

 * switch lots of parsing to Nokogumbo to keep things consistent
 * deep CSS sanitization is now built in, and with a proper parser (meaning
   we can drop our code to do it, and adjust some specs to account for things
   that _are_ valid)

lots of changes because gumbo parsing<->serialization cycle is slightly different:
 * better job preserving original whitespace
 * literal non-breaking space characters are converted to &nbsp; entities
 * <p> tags aren't inserted for the heck of it
 * several _other_ entities are unnecessary, and output as literal characters
 * some elements no longer have a closing tag

Change-Id: I7c5e36cbd04b8a05f64c9e0af00868dd6b00f4ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256444
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-02-17 18:17:57 +00:00
Jeremy Stanley c51472c6a3 fix kaltura session domain when plugin setting isn't indifferent
also rework the kaltura stubbing so that `config` is actually
tested

flag = none

refs LS-1813

Change-Id: Id83bf22df6b73b0bc589b3a105ee1e7f941a8ce0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257253
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: JuanPablo Montoya <juanpablo.montoya@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-01-27 17:05:34 +00:00
James Butters 9bcdf76bec fix parallel log generation
need unique logs for each process in a docker container

flag = none

Test Plan:
- Jenkins passes

Change-Id: Id673ae151aec404daca145dab0f08b3bfae911e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256985
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-01-19 22:13:34 +00:00
Kyle Rosenbaum a4e1da3aea add the ability to run parallel rspec processes in container
refs DE-225
flag=none

By specifying RSPEC_PROCESSES, we can now run multiple
rspec processes in a single container. This change modifies
the existing database setup to create 1 database per rspec
process. This also impacts results.xml using a 1 results.xml
per rspec process.

Rename database key to db for redis configurations to match
current version of redis.

test plan:
- rspec runs as expected in single threaded mode
- rspec runs as expected in multi threaded mode
- results.xml contains valid results with no duplciate tests
- reruns only run for failing threads
- reruns work in single and multithreaded mode

Change-Id: Ib2e549d467e8a6d8fef9914f2733d9ddfa460e99
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255120
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-01-14 21:12:45 +00:00
Jacob Burroughs 53a2c7f414 Fix lazyi18n in local dev with spring
Ensures that the base backend is already loaded because otherwise
things get sad sometimes

Change-Id: I37306327466d0bbdda8126d79fb96695a52675a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256224
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-01-07 18:33:34 +00:00
Michael Ziwisky 7e5eda6ae9 speed up app boot with lazy translations
fixes FOO-1170

Some old code that was intended to reduce app boot/initialization time
by skipping loading of non-english strings had its heart in the right
place, but after a series of tweaks, its head got screwed up and it
hasn't actually been having any effect on language loading for some time
now. So this removes that code in favor of a new strategy -- don't
eagerly load _any_ languages, rather lazy-load them all on first access.
This is accomplished by a new `LazyPresumptuousI18nBackend`.

On local benchmarks, this change reduces app boot time by about 35%
(from ~44s to ~28s on Rails 5.2, and from ~52s to ~34s on Rails 6.0).

Also drops `CalculateDeprecatedFallbacks` as we no longer have any
`deprecated_for` flags in our translations files.

test plan:
 - make sure canvas still runs and it still shows strings
 - observe that it boots 35% faster! e.g., when you run a spec. 30
   seconds is still a bummer, but it's less of a bummer than 45 seconds!

Change-Id: If92a99a32c94b24e20f5ac074ae568357811b899
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251613
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2020-11-18 00:40:13 +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
Ethan Vizitei fc97202aa6 remove migration shims for auditors datastore
closes FOO-1024

rather than provide migration instructions for all
users to get off of cassandra and on to postgres
for their auditors data, this will
default any un-configured installs to write
both places for now.

After a year, which is the retention window for
auditors data, we can force reads to come from AR
and deprecate/remove any cassandra code
entirely.

also clean up some model tests to not reach so deeply into
the implementation of auditors

Change-Id: If4ca01682618f85d04c9ee7a91522f4c1deac1ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249162
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-11-09 16:30:30 +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
Cody Cutrer 934e10af14 rails 6: various fixes for controller specs
Change-Id: I93b6470bda86efc324d3fe0704d271813c49d6dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250497
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-21 20:00:05 +00:00
Cody Cutrer c5227d3f1b shackles was renamed to guardrail
closes FOO-989, FOO-990

Change-Id: I49dfa130cb74c34dd0eb25952790176ae4951058
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249365
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-06 19:23:08 +00:00
wdransfield 7b48458766 Capture attachment clone_url failures
refs INTEROP-6204
flag=none

We are seeing some errors pop up here when Canvas
attempts to retrieve objects from the google drive
LTI S3 bucket.

The attachment stores some generic error info
in the `upload_error_message` column, but we need
to see the body of the response to determine the
issue.

Test Plan:
- In a Rails console, create or find an attachment
- Call attachment.clone_url(url, nil, nil) with a url
  that will return a non-200 response
- Verify an error is caputred that contains the
  url that failed, a portion of the response
  body, and the http status code
- Verify clone_url still works when provided
  a URL that returns a file and a 200 status
  code

Change-Id: Iaff61cf773a72bf74ecc02602b41e8b561403ef2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248978
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2020-10-02 18:16:01 +00:00
Cody Cutrer f64eeb7593 ruby 2.7: don't try to hide untaint
Change-Id: I5ac22a846e8850d418c4d734e1133d51bbdbe645
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248111
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-09-22 16:08:57 +00:00
Cody Cutrer 42020b07bf delay loading live events context until we actually send a live event
Change-Id: Ieae2aaa3400c88959e2227874c6ca94794b258c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246222
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2020-09-03 17:20:12 +00:00
James Williams a6e6fd0670 split built-in role rows by root account
test plan:
* a multi-tenant shard should still work
 creating enrollments and account admins before and after
 running postdeploy migrations
* the postdeploy should successfully run a datafixup
 to split up build-in role rows and reassign the role_id on
 other tables (account_notification_roles, account_users,
 enrollments, and role_overrides) accordingly

closes #INTEROP-6045

Change-Id: I8325acb635397ac1b008b9d09788595da597cec7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243906
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2020-09-01 19:21:27 +00:00
Michael Brewer-Davis 434ad98e68 spec: move create_records to factories include
flag=none

Test plan:
- run
    require 'spec/factories'
    include Factories
    n_students_in_course(100)

Change-Id: Ida42b5a6ac45a549973c92e160efe76f3d4cc6f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243896
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
2020-08-03 16:18:04 +00:00
James Butters c5fb85082a new build for parallel log generation
closes: DE-119
flag = none

Test Plan:
-Regular jenkins builds pass
-New build Canvas/test-suites/rspec-parallel-log
  -passes and pushes gerrit with new log
  -fails and does not run create gerrit stage
    -once one step fails, entire build is failed immediately

Change-Id: I965676e26927ec5b539532cdf87191cc52db9151
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242157
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-07-31 17:27:02 +00:00
Michael Brewer-Davis 8811aacaed spec: move factory initialization to standalone file
flag=none

- allows bringing into development console with
    require 'spec/factories'
    include Factories

Test plan:
- run require/include as above
- verify factory methods work in console
  > c = course_model
  > o = outcome_model(context: c)
  > r = custom_teacher_role('foo')

Change-Id: Id6816706a8e97a186c70ab57d4d533611d692737
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243872
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2020-07-30 17:51:18 +00:00
Ahmad Amireh cff62fd8ea allow site admins to disable GA & FullStory
fixes FOO-692
flag  = none

note that we don't support controlling these settings through the API
since it's not part of the requirements

\ test plan \
 \ --------- \

- as a site admin, verify you can toggle Google Analytics and FullStory
  for a root account other than the siteadmin account (details below)
- as an account admin, verify you do NOT see the privacy controls

=======================================================================

If you want to fully QA this, I'll walk you through enabling the two
offenders first and then checking that they're running.

== Google Analytics

To enable GA, configure the `google_analytics_key` in the console and
restart your Rails server:

    Setting.set('google_analytics_key', 'asdfasdf')

To confirm that GA is disabled, its snippet should not be included in
the DOM. You can use this query to get at that element:

    [].filter.call(
      document.head.querySelectorAll('script'),
      x => x.innerHTML.match(/window\.ga/)
    )

== FullStory

To enable FS in the first place, you must first enable the feature flag
"enable_fullstory" at the site_admin level and then configure your
dynamic_settings.yml as shown in g/230591. Be sure to restart Rails.

To confirm that FS is disabled, its snippet should not be included in
the DOM. You can use this query to get at that element:

    [].filter.call(
      document.head.querySelectorAll('script'),
      x => x.innerHTML.match(/FS\.identify/)
    )

Change-Id: Ib7493f6dc342f4d96cb0c6fa944b7e56e8a45d29
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242531
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2020-07-14 19:45:11 +00:00
Jacob Burroughs 34972f86ad Just skip stubbing prepended class methods on all ruby 2.6s
Change-Id: I2a32438e007afa7732914dad394115b7a6f5ca4d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242392
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-07-10 16:58:29 +00:00
James Butters 56c1ebf76c spec: junit for rspec results
closes: CCI-398

Test Plan:
 Jenkins passes with junit results published
 splunk logs show the same junit results

flag = none

Change-Id: Ia2d3739fbb4235f0e227091c5209772630d533ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238055
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-06-09 21:24:08 +00:00
Benjamin Christian Nelson 9a20868030 remove unused selinimum gem
Change-Id: I0adc219a6cab442226619d5bdd0814d7f09d0d52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230713
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-04-23 17:25:57 +00:00
Michael Brewer-Davis e18bfb9871 create LtiConference for lti conference_selection placement
closes CAL-2
flag=conference_selection_lti_placement

Test plan:
- create an api access token from user settings
- add an LTI tool with conference placement
  (including FF, see g/232853) to a course.
  You will need the course id and the tool id.
- create an LTI conference via the API, e.g.:
  > curl http://canvas.docker/api/v1/courses/${COURSE_ID}/conferences \
    -H 'Content-type: application/json' \
    -H 'Authorization: Bearer ${ACCESS_TOKEN}' \
    -d '{
          "web_conference": {
             "title": "Something",
             "conference_type": "LtiConference",
             "lti_settings": {
                "tool_id": ${TOOL_ID}
             }
          }
        }'
- view the conferences created via the api
  > curl -H 'Authorization: Bearer ${ACCESS_TOKEN}' \
      http://canvas.docker/api/v1/courses/${COURSE_ID}/conferences

Change-Id: I5d1da73c76590395b7d37c58deaf4b1a69cff9b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233227
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Steve Shepherd <sshepherd@instructure.com>
Product-Review: Steve Shepherd <sshepherd@instructure.com>
2020-04-21 15:19:49 +00:00
James Butters bf5a8f5a2a use parallel_tests for more parallelization
Using the parallel_tests gem allows us to parallelize more
and a bit simpler. Removes headless stuff now that we don't
use it anymore, comments out video recording code since it
doesn't work, removes all knapsack code.

flag = none
Test Plan:
Jenkins rspec and selenium builds pass
rspec and selenium builds copy results to html publisher
rspec and selenium have nodes split into processes

Change-Id: Ibd00eba77f8193be5eadd41aef1e0617c9ae470c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227677
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-03-30 21:38:47 +00:00
James Williams c59a7ec906 spec: fixes for ruby 2.6
Change-Id: I5e35efeeb5258939e9e404cd90d35764659c1a87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223384
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-03-09 15:57:06 +00:00
Simon Williams 4693861183 remove action_controller_test_process shim
it was used for two things:
- file_fixture_upload, which now comes from
  ActionDispatch::TestProcess::FixtureFile
- Rack::Test::UploadedFile which comes from the rack-test gem

Change-Id: I27957b410fcf4677dac77aed1b00b04dfd1b012e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222555
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-01-10 18:54:48 +00:00
Derek Bender e1d1a863a5 Spec: Add another version of ruby to busted prepend list
Closes: CCI-145

Change-Id: I0bb3ba81b61c53d9e642ef086cfa43b3fa820574
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220010
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2019-12-10 20:57:41 +00:00
Derek Bender 1586a140ac Add pg_collkey to postgres image for docker builds
Closes: CCI-2

Test Plan:
- specs that require pg_collkey are ran in new jenkins

Change-Id: I530373f9855d124dfc3c302e0d340f6217b8f33a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215422
Reviewed-by: S. Jacob Powell <spowell@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2019-11-13 23:51:59 +00:00
James Butters d7b0dc2625 spec: reruns for rspec
closes: CORE-3299

Change-Id: I0febb9d4f6fdcf3f48d4e0079e7a230ac505218d
Reviewed-on: https://gerrit.instructure.com/208862
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2019-09-18 20:01:14 +00:00
James Williams 62b33da585 require present value for knapsack enabled env
Change-Id: I0f4b3e1da3cd78a93e052f81ec8cd96b51804d33
Reviewed-on: https://gerrit.instructure.com/209673
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-09-17 17:11:44 +00:00
James Williams 2768dda033 use knapsack in new jenkins rspec build
closes #CORE-3292 #CORE-3293

Change-Id: Id54c8568bd1ca45929f35926e0eebdd558e68a58
Reviewed-on: https://gerrit.instructure.com/207602
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-09-13 15:19:34 +00:00
James Williams d978c3726a spec: remove bullet
Change-Id: I86b001fce08704adec5d23f69fdbd7c9834c4463
Reviewed-on: https://gerrit.instructure.com/209074
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-09-13 15:12:32 +00:00
Derek Bender 15c8009064 Remove unused provisional_grade_id from url
Closes: GRADE-2066

test plan:
- no behavioral changes

Change-Id: Id70ad67ce4d56c8a2b9718f84c0844016bcd44c9
Reviewed-on: https://gerrit.instructure.com/206710
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-09-10 15:46:59 +00:00
James Williams c4465d9f1e spec: use redis config when looking up redis_cache_store
Change-Id: Ic2fe269749f207d62743030e7c94de7793cede09
Reviewed-on: https://gerrit.instructure.com/208461
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-09-06 14:19:47 +00:00
Cody Cutrer 414fca0278 spec: recognize more bad versions of ruby
Change-Id: Ib48d20836f8063de61107cb0ec6f6e2c85d49dca
Reviewed-on: https://gerrit.instructure.com/208076
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
2019-09-05 15:39:01 +00:00
Cody Cutrer 232d7b0e24 mark more ruby versions as having bad prepended class method stubbing
Change-Id: Id1e933038be5c6552372e6834383cf9a1acc6add
Reviewed-on: https://gerrit.instructure.com/207904
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-09-03 19:16:31 +00:00
Cody Cutrer 4f267c41b9 various rails 6 fixes
Change-Id: I9a2da0fe619170e6a297ad5d1b9dd3e11daf3782
Reviewed-on: https://gerrit.instructure.com/206054
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-21 19:47:32 +00:00
Cody Cutrer cbf7b720a3 add rails6 gem, and boot console
disable bullet in rails 6

Change-Id: Ic84a291c9bd81dd1ef93d414b9ef73d277d07273
Reviewed-on: https://gerrit.instructure.com/204711
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-12 20:09:56 +00:00
Cody Cutrer c9aab282ba use rails built-in RedisCacheStore
RedisStore is no longer supported

somewhat surprisingly, the serialization formats are compatible, so we don't
need to do any namespacing

Change-Id: Iede3a023cada95313875f0ce419b649c364ee97c
Reviewed-on: https://gerrit.instructure.com/202663
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-08-09 20:22:56 +00:00
James Williams f888621298 add streaming templates: part 2
adds template streaming to the following endpoints:

assignments#show
context_modules#index
courses#show
discussion_topics#show
quizzes/quizzes#show
quizzes/quizzes#edit
quizzes/quizzes#history

Change-Id: I2481f3f738077fb0eaef16e6b5f0db3ea6f60c16
Reviewed-on: https://gerrit.instructure.com/202708
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-05 19:10:20 +00:00
Ryan Shaw 989ed93e6c add streaming templates: part 1
send the head tag before we start rendering
the rest of the response for the following
high traffic endpoints:

context#roster_user
courses#index
eportfolio_categories#show
eportfolio_entries#show
eportfolios#show
gradebooks#grade_summary
submissions#show

Change-Id: I2bb2e068c4c0633964aee05c27d3e6207e1cf472
Reviewed-on: https://gerrit.instructure.com/199707
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
2019-07-31 19:23:44 +00:00
Tucker McKnight b4b70d4e00 spec: Unskip tests that use the RCE API
We can run these again, now that the RCE API port has been
changed in rspect.

test plan:
- tests pass

Change-Id: Id399589b5e41788210adb4b7661bc606519ae127
Reviewed-on: https://gerrit.instructure.com/195864
Tested-by: Jenkins
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2019-05-31 22:24:07 +00:00
Tucker McKnight 387bff1065 spec: Skip RCS tests and change port value for RCE API
The tests should be un-skipped as soon as we change which
port the RCE API is running on, which would be a commit in the
rspect repo.

test plan:
- Tests pass

Change-Id: I4778e2210dee0e1377c9d0826fbb8768c5bc0871
Reviewed-on: https://gerrit.instructure.com/195675
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2019-05-29 21:45:33 +00:00
James Williams bcdaf5fac9 add caching around permission/role_override calculations
test plan:
* permissions should behave exactly as before
* cached permissions should update correctly when changed
through the UI (or if accounts associations are changed)

refs #CORE-2851

Change-Id: I5c39547039b44f77e1f3bd3978783520b8191e3c
Reviewed-on: https://gerrit.instructure.com/193004
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-05-29 15:52:47 +00:00
James Williams 7304ad132f spec: add specs_require_cache
Change-Id: I322027792822f50e7c5afa75e4216534bced031c
Reviewed-on: https://gerrit.instructure.com/194572
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-05-21 18:59:05 +00:00
James Williams 3e161cb6e8 partition messages
test plan:
* run the migrations
* sending messages and viewing them as an admin
 should work as before

closes #COMMS-1327

Change-Id: If955b49d07fa68f8a5151984eb4d9c3b97b118ee
Reviewed-on: https://gerrit.instructure.com/170657
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2018-12-10 13:42:35 +00:00
Cody Cutrer acb948337c add attachment specific subdomain if configured
closes CORE-942

test plan:
 * add `attachment_specific_file_domain: true` to your dynamic_settings.yml
   (or to consul) as illustrated in the example
 * have a files domain configured
 * browse Canvas
 * verify that files go through a domain with their ID in it, rather than
   just the basic files domain

Change-Id: I21540fb06266dcbf80b66bb884c09cd14eb03456
Reviewed-on: https://gerrit.instructure.com/166462
Tested-by: Jenkins
Product-Review: Matt Miller <mmiller@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2018-11-19 22:39:50 +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