canvas-lms/spec/fixtures
Evan Battaglia c856299406 Do not crash import on ResourceLinks w/o url
refs INTEROP-7258
flag=none

These can exist when exporting a course where there are
Lti::ResourceLinks whose current_external_tool is an LTI 1.1 tool
without a URL. A future commit will prevent ResourceLinks with no URL
from appearing in an export, but since people already have export files
with these LRLs without URLs, we should fix it to not crash the import.

Test plan:
- Have a course with some resource links (e.g. create an LTI 1.3
  assignmentor use deep linking in RCE in the syllabus, when editing an
  assignment body, etc.)
- Create an LTI 1.1 tool without a URL (but with a domain) in the course
  or account.
- In a Rails console, change the context_external_tool_id of the
  Lti::ResourceLink to point to the LTI 1.1 tool with no URL.
- Export the course. Check in the resulting imscc file (actually a zip
  file) that there is a file in lti_resource_links/ that does not have a
  launch_url or secure_launch_url.
- Import the course content in some course. The import should succeed.
- In a rails console lookup resource links with the same lookup_uuid as
  the one pointing to an LTI 1.1 tool to make sure no resource links
  were created by the import:
    Lti::ResourceLinks.where(lookup_uuid:
    lrl_pointing_to_11tool.lookup_uuid)

Change-Id: I420929b2d291d551f43bd2189a48cb911971e1cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285477
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
2022-02-23 21:19:54 +00:00
..
asset_files
data_generation Save root account in k5 seeding script 2021-12-10 18:17:12 +00:00
docs delete scribd 2018-04-10 17:39:52 +00:00
exporter Export files for web_zip without escaping file names 2017-02-02 18:51:51 +00:00
files Fix wordcount in attachments being slow in large courses 2022-02-03 17:37:11 +00:00
gradebooks Update gradebook import to support separate first/last names 2021-11-15 17:27:55 +00:00
importer Do not crash import on ResourceLinks w/o url 2022-02-23 21:19:54 +00:00
lti Update post grades lti dialog to canvas look and feel 2017-01-20 17:58:34 +00:00
migration spec: Uses smaller zip file to get a context's durations shorter 2021-08-27 16:56:33 +00:00
sis ignore BOM for csv imports 2021-09-14 03:05:20 +00:00
100mpx.png
alphabet_soup.zip
attachments.zip
bounces.json
courses.yml
file_mail.txt
html_mail.txt
huge_zip.zip
mail.txt
message_1.txt
message_2.txt
message_3.txt
multipart-request
selection_test_lti.xml
submissions.zip
test.js spec: Run prettier on spec/ 2019-10-10 20:16:14 +00:00
test.xsd
test_image.jpg
tilde.zip
zip_with_long_filename_inside.zip Fix content export/import with longfilenames 2021-10-14 18:26:37 +00:00
zipbomb.zip