gitlab-org--gitlab-foss/spec/support
Jan Provaznik 7da3b2cdd0 Delete remote uploads
ObjectStore uploader requires presence of associated `uploads` record
when deleting the upload file (through the carrierwave's after_commit
hook) because we keep info whether file is LOCAL or REMOTE in `upload`
object.

For this reason we can not destroy uploads as "dependent: :destroy" hook
because these would be deleted too soon. Instead we rely on
carrierwave's hook to destroy `uploads` in after_commit hook.

But in before_destroy hook we still have to delete not-mounted uploads
(which don't use carrierwave's destroy hook). This has to be done in
before_Destroy instead of after_commit because `FileUpload` requires
existence of model's object on destroy action.

This is not ideal state of things, in a next step we should investigate
how to unify model dependencies so we can use same workflow for all
uploads.

Related to #45425
2018-05-16 08:58:07 +02:00
..
api Updates updated_at on issue when using /spend quick action 2018-05-09 18:08:37 +02:00
banzai
chunked_io Introduce Redis helpers. Rename BuildTraceChunkFlushToDbWorker to Ci::BuildTraceChunkFlushWorker. 2018-05-04 17:02:08 +09:00
controllers Merge branch 'jej/refactor-omniauth-controller' into 'master' 2018-04-24 10:18:10 +00:00
cycle_analytics_helpers
features Refactor discussions/notes code 2018-04-03 16:03:00 +00:00
gitlab-git-test.git Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
gitlab_stubs
google_api
helpers Fix gitaly-ruby bundle poisoning in CI 2018-05-14 08:10:29 +00:00
http_io Make HTTPIO compatible with multi-byte chars (Extracted from ChunkedIO) 2018-04-17 14:50:32 +09:00
import_export
matchers Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
migrations_helpers
prometheus
protected_tags
redis Introduce Redis helpers. Rename BuildTraceChunkFlushToDbWorker to Ci::BuildTraceChunkFlushWorker. 2018-05-04 17:02:08 +09:00
services Extract shared components from Clusters::CreateService spec 2018-05-13 14:17:34 +02:00
shared_contexts Backport 5480-epic-notifications from EE 2018-05-07 12:58:47 -06:00
shared_examples Delete remote uploads 2018-05-16 08:58:07 +02:00
batch_loader.rb
capybara.rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
carrierwave.rb
commit_trailers_spec_helper.rb Fix commit trailer rendering when Gravatar is disabled 2018-04-25 17:32:51 +02:00
db_cleaner.rb
forgery_protection.rb Backport with_forgery_protection spec helper 2018-05-08 23:24:00 +01:00
generate-seed-repo-rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
gitaly.rb Make all workhorse gitaly calls opt-out, take 2 2018-03-28 14:13:06 +02:00
issuables_requiring_filter_shared_examples.rb Check if at least one filter is set on dashboard 2018-04-03 20:19:09 +02:00
json_response.rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
omni_auth.rb
prepare-gitlab-git-test-for-commit Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
rspec.rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
seed.rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
setup_builds_storage.rb
sidekiq.rb
stored_repositories.rb
unpack-gitlab-git-test
webmock.rb