summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2019-01-24 19:07:10 +0100
committerGabriel Mazetto <brodock@gmail.com>2019-01-25 20:26:35 +0100
commit02ac66de9063178ef03c3580cae886e4137948be (patch)
tree568a7c16f50c3772e78ca80c65705425383756e9 /spec
parent7bc16889df458865ffbbb7bef8087c04a5768a1d (diff)
downloadgitlab-ce-02ac66de9063178ef03c3580cae886e4137948be.tar.gz
Track when MigrateAttachmentsService is skipped
We need this new state for the Geo event logic in EE
Diffstat (limited to 'spec')
-rw-r--r--spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
index bef12df583e..61dbb57ec08 100644
--- a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
+++ b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
@@ -32,6 +32,12 @@ describe Projects::HashedStorage::MigrateAttachmentsService do
it 'returns true' do
expect(service.execute).to be_truthy
end
+
+ it 'sets skipped to false' do
+ service.execute
+
+ expect(service.skipped?).to be_falsey
+ end
end
context 'when original folder does not exist anymore' do
@@ -49,10 +55,14 @@ describe Projects::HashedStorage::MigrateAttachmentsService do
end
it 'returns true' do
- expect(FileUtils).not_to receive(:mv).with(base_path(legacy_storage), base_path(hashed_storage))
-
expect(service.execute).to be_truthy
end
+
+ it 'sets skipped to true' do
+ service.execute
+
+ expect(service.skipped?).to be_truthy
+ end
end
context 'when target folder already exists' do