canvas-lms/spec/lib
Jacob Fugal 14d54e7eb3 export attachments to instfs
closes RECNVS-43

This datafixup finds attachments which do not have an instfs_uuid,
creates `references` for them, posts them to instfs /references
endpoint. The endpoint imports them into instfs and returns an array
of the references with their new uuids. The attachments are updated
to include the uuids from instfs

Test plan
- turn on s3 storage for files in canvas
- with inst-fs off in canvas (deactivate the plugin), upload a file
- Enable the inst-fs plugin
- in the rails console, run
  `DataFixup::ExportAttachmentsToInstfs.run(Account.find(1))`
  (or whatever your account id is)
- verify using instfs /debug/attachments/ls route that the attachment
  was posted
  to instfs
- verify using the rails console that the attachment has an instfs_uuid

Change-Id: I26720c2324b7302a3a843f04932785518ac699e7
Reviewed-on: https://gerrit.instructure.com/142572
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
Reviewed-by: Michael Jasper <mjasper@instructure.com>
2018-03-07 19:38:50 +00:00
..
address_book Fix blank conversation_id param for conversations 2017-10-03 16:59:17 +00:00
api transpose cross-shard links in api_user_content 2018-02-27 16:57:45 +00:00
app_center spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
basic_lti Fix External Tool Submission Type subbmitted_at 2018-01-02 22:38:02 +00:00
canvadocs teacher canvas permissions set to readwritemanage 2018-01-17 16:41:14 +00:00
canvas soft-delete access_tokens and notification_endpoints 2018-03-01 14:13:25 +00:00
cc master courses: copy assignment group rules selectively 2018-03-05 16:23:41 +00:00
data_fixup export attachments to instfs 2018-03-07 19:38:50 +00:00
ext da licença part 47 2017-04-28 17:59:55 +00:00
latex spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
lti Add com.instructure.Course.groupIds varaible expansion 2018-03-01 17:45:35 +00:00
messageable_user spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
outcomes Outcomes import job runner with status and errors 2018-03-06 16:30:48 +00:00
reporting spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
services spec: reset MultiCache 2017-09-13 00:26:30 +00:00
sis allow empty strings to be ignored for sis import 2018-03-02 18:04:05 +00:00
support_helpers spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
turnitin Handle turnitin polling more gracefully 2018-01-22 23:47:48 +00:00
user_content da licença part 47 2017-04-28 17:59:55 +00:00
utils da licença part 47 2017-04-28 17:59:55 +00:00
acts_as_list_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
address_book_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
api_spec.rb transpose cross-shard links in api_user_content 2018-02-27 16:57:45 +00:00
asset_signature_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
assignment_override_applicator_spec.rb fix assignment override calcs to ignore deleted student overrides 2018-03-06 22:22:30 +00:00
assignment_util_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
authentication_methods_spec.rb allow dev_keys to be created at a sub account 2018-01-30 16:46:18 +00:00
basic_lti_spec.rb Make ampersand regex less greedy 2017-11-21 17:30:48 +00:00
brand_config_helpers_spec.rb Remove remaining dynamic brand css code 2017-10-03 22:49:11 +00:00
brand_config_regenerator_spec.rb Remove remaining dynamic brand css code 2017-10-03 22:49:11 +00:00
brandable_css_spec.rb Handle named colors like ‘red’ in theme editor 2018-02-16 23:26:02 +00:00
canvas_spec.rb fix shard namespacing in cache 2017-09-13 23:22:18 +00:00
config_file_spec.rb Skip tests that require plugin unless plugin installed 2017-07-28 19:30:52 +00:00
content_notices_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
content_zipper_spec.rb allow unicode characters submission zip files 2018-02-21 16:08:36 +00:00
course_link_validator_spec.rb don't search deleted questions for broken links 2018-01-25 13:18:46 +00:00
crummy_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
cuty_capt_spec.rb don't process url's with CutyCapt that don't resolve 2017-11-06 18:08:23 +00:00
dates_overridable_spec.rb ignore deleted overrides in has_overrides? 2017-10-19 17:01:41 +00:00
delayed_message_scrubber_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
differentiable_assignment_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
due_date_cacher_spec.rb fix stale grades when re-assigning students to assignment 2018-02-22 16:04:24 +00:00
duplicating_objects_spec.rb Add the ability to duplicate modules. 2017-11-03 15:52:43 +00:00
effective_due_dates_spec.rb fix assignment override calcs to ignore deleted student overrides 2018-03-06 22:22:30 +00:00
email_address_validator_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
enrollments_from_user_list_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
external_feed_aggregator_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
feature_flags_spec.rb Quizzes Next Feature Flag support 2018-01-11 22:39:42 +00:00
feature_spec.rb prevent disabling new gradebook if any sub-account/course uses it 2018-03-07 17:30:49 +00:00
file_in_context_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
grade_calculator_spec.rb Store points and points_possible for all Scores 2018-02-07 18:32:11 +00:00
gradebook_exporter_spec.rb fix gradebook exporter csv offset issues 2018-02-06 22:31:37 +00:00
gradebook_grading_period_assignments_spec.rb replace effective due dates with cached due dates 2017-07-24 15:27:05 +00:00
gradebook_importer_spec.rb add unposted scores to gradebook import/export 2018-01-29 18:20:24 +00:00
gradebook_user_ids_spec.rb limit user ids to students visible to user 2018-01-15 21:25:07 +00:00
grading_period_helper_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
ha_store_spec.rb trigger consul event of HA Cache invalidation 2017-09-26 15:59:04 +00:00
has_content_tags_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
host_url_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
i18n_spec.rb drop rails 4.2 2017-06-27 15:29:51 +00:00
i18n_time_zone_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
imported_html_converter_spec.rb Replace base64 images in import with file links 2017-12-22 21:54:56 +00:00
inst_fs_spec.rb set Attachment.current_root_account during jobs 2018-03-07 17:18:24 +00:00
job_live_events_context_spec.rb symbolize live events 2017-05-14 01:30:14 +00:00
late_policy_applicator_spec.rb late and missing policies ignore concluded students 2017-12-20 20:04:18 +00:00
latex_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
locale_selection_spec.rb allow aliases for locale names coming from browsers 2018-02-05 19:52:03 +00:00
logging_filter_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
math_man_spec.rb Add rake task to populate Consul from dynamic_settings.yml 2017-09-19 18:08:39 +00:00
message_dispatcher_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
message_scrubber_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
messageable_user_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
missing_policy_applicator_spec.rb late and missing policies ignore concluded students 2017-12-20 20:04:18 +00:00
model_cache_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
multi_cache_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
must_view_module_progressor_spec.rb bypass the wiki model as much as possible for wiki_pages 2017-08-09 16:09:06 +00:00
mutable_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
notification_message_creator_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
package_root_spec.rb refactor package content management 2017-11-15 18:03:18 +00:00
password_policy_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
plannable_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
progress_runner_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
safe_yaml_spec.rb fix viewing error reports for unknown formats 2017-11-21 20:03:17 +00:00
sanitize_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
scope_filter_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
security_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
sentry_proxy_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
session_token_spec.rb API for initiating a web session from an access token 2017-06-15 22:38:47 +00:00
sort_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
sorts_assignments_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
spec_helper_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
ssl_common_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
stats_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
sticky_sis_fields_spec.rb add parent_account_id as a sticky sis field 2018-01-19 13:20:20 +00:00
submission_list_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
submittable_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
summary_message_consolidator_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
text_helper_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
timed_cache_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
turnitin_spec.rb spec: remove mocha 2017-07-27 18:22:39 +00:00
unzip_attachment_spec.rb spec: mocha => rspec-mocks for lib 2017-07-26 19:20:32 +00:00
user_content_spec.rb da licença part 47 2017-04-28 17:59:55 +00:00
user_list_spec.rb allow any printable character in usernames 2017-08-23 18:55:27 +00:00
user_list_v2_spec.rb use opaque tokens rather than ids to mass-enroll users 2017-11-08 20:29:07 +00:00
user_merge_spec.rb cleanup invalid quiz_submissions on user merge 2017-08-22 16:49:22 +00:00
user_search_spec.rb limit communication_channels to root_account 2018-02-22 22:02:34 +00:00
validates_as_url.rb da licença part 47 2017-04-28 17:59:55 +00:00