summaryrefslogtreecommitdiff
path: root/spec/services/projects
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 21:08:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 21:08:48 +0000
commita89cb5cbdd832d4d9e80517973aceda6bc0a3856 (patch)
tree574475bd0901a2f8906d36a4728b8bbb95b41e1c /spec/services/projects
parent0d6fa033121a9bef708b8f2de186c4034c61d4a3 (diff)
downloadgitlab-ce-a89cb5cbdd832d4d9e80517973aceda6bc0a3856.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/projects')
-rw-r--r--spec/services/projects/batch_open_issues_count_service_spec.rb2
-rw-r--r--spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb8
-rw-r--r--spec/services/projects/hashed_storage/rollback_attachments_service_spec.rb6
-rw-r--r--spec/services/projects/housekeeping_service_spec.rb2
-rw-r--r--spec/services/projects/open_issues_count_service_spec.rb2
5 files changed, 10 insertions, 10 deletions
diff --git a/spec/services/projects/batch_open_issues_count_service_spec.rb b/spec/services/projects/batch_open_issues_count_service_spec.rb
index e978334d68b..8cb0ce03fba 100644
--- a/spec/services/projects/batch_open_issues_count_service_spec.rb
+++ b/spec/services/projects/batch_open_issues_count_service_spec.rb
@@ -8,7 +8,7 @@ describe Projects::BatchOpenIssuesCountService do
let(:subject) { described_class.new([project_1, project_2]) }
- context '#refresh_cache', :use_clean_rails_memory_store_caching do
+ describe '#refresh_cache', :use_clean_rails_memory_store_caching do
before do
create(:issue, project: project_1)
create(:issue, project: project_1, confidential: true)
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 b0827f6a2ee..7c7e188a12d 100644
--- a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
+++ b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
@@ -14,7 +14,7 @@ describe Projects::HashedStorage::MigrateAttachmentsService do
let(:old_disk_path) { File.join(base_path(legacy_storage), upload.path) }
let(:new_disk_path) { File.join(base_path(hashed_storage), upload.path) }
- context '#execute' do
+ describe '#execute' do
context 'when succeeds' do
it 'moves attachments to hashed storage layout' do
expect(File.file?(old_disk_path)).to be_truthy
@@ -102,13 +102,13 @@ describe Projects::HashedStorage::MigrateAttachmentsService do
end
end
- context '#old_disk_path' do
+ describe '#old_disk_path' do
it 'returns old disk_path for project' do
expect(service.old_disk_path).to eq(project.full_path)
end
end
- context '#new_disk_path' do
+ describe '#new_disk_path' do
it 'returns new disk_path for project' do
service.execute
@@ -116,7 +116,7 @@ describe Projects::HashedStorage::MigrateAttachmentsService do
end
end
- context '#target_path_discardable?' do
+ describe '#target_path_discardable?' do
it 'returns true when it include only items on the discardable list' do
hashed_attachments_path = File.join(base_path(hashed_storage))
Projects::HashedStorage::MigrateAttachmentsService::DISCARDABLE_PATHS.each do |path_fragment|
diff --git a/spec/services/projects/hashed_storage/rollback_attachments_service_spec.rb b/spec/services/projects/hashed_storage/rollback_attachments_service_spec.rb
index 98b343371df..54695e6e48f 100644
--- a/spec/services/projects/hashed_storage/rollback_attachments_service_spec.rb
+++ b/spec/services/projects/hashed_storage/rollback_attachments_service_spec.rb
@@ -14,7 +14,7 @@ describe Projects::HashedStorage::RollbackAttachmentsService do
let(:old_disk_path) { File.join(base_path(hashed_storage), upload.path) }
let(:new_disk_path) { File.join(base_path(legacy_storage), upload.path) }
- context '#execute' do
+ describe '#execute' do
context 'when succeeds' do
it 'moves attachments to legacy storage layout' do
expect(File.file?(old_disk_path)).to be_truthy
@@ -86,13 +86,13 @@ describe Projects::HashedStorage::RollbackAttachmentsService do
end
end
- context '#old_disk_path' do
+ describe '#old_disk_path' do
it 'returns old disk_path for project' do
expect(service.old_disk_path).to eq(project.disk_path)
end
end
- context '#new_disk_path' do
+ describe '#new_disk_path' do
it 'returns new disk_path for project' do
service.execute
diff --git a/spec/services/projects/housekeeping_service_spec.rb b/spec/services/projects/housekeeping_service_spec.rb
index 60804a8dba6..98a27a71c26 100644
--- a/spec/services/projects/housekeeping_service_spec.rb
+++ b/spec/services/projects/housekeeping_service_spec.rb
@@ -75,7 +75,7 @@ describe Projects::HousekeepingService do
# At push 200
expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :gc, :the_lease_key, :the_uuid)
- .exactly(1).times
+ .once
# At push 50, 100, 150
expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :full_repack, :the_lease_key, :the_uuid)
.exactly(3).times
diff --git a/spec/services/projects/open_issues_count_service_spec.rb b/spec/services/projects/open_issues_count_service_spec.rb
index 04f1353c499..c1d49befeb9 100644
--- a/spec/services/projects/open_issues_count_service_spec.rb
+++ b/spec/services/projects/open_issues_count_service_spec.rb
@@ -57,7 +57,7 @@ describe Projects::OpenIssuesCountService, :use_clean_rails_memory_store_caching
end
end
- context '#refresh_cache' do
+ describe '#refresh_cache' do
before do
create(:issue, :opened, project: project)
create(:issue, :opened, project: project)