Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-14 03:09:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-14 03:09:57 +0300
commit9398d718d92a40a0a917040645a55dea51467a91 (patch)
treece1242c69221f1e6abd701439631cf6e6d1b948d /spec/workers
parent602ea42669779ec431bcaeb41fd95e079b1a7021 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/project_update_repository_storage_worker_spec.rb29
1 files changed, 4 insertions, 25 deletions
diff --git a/spec/workers/project_update_repository_storage_worker_spec.rb b/spec/workers/project_update_repository_storage_worker_spec.rb
index ed99b8135c2..57a4c2128b3 100644
--- a/spec/workers/project_update_repository_storage_worker_spec.rb
+++ b/spec/workers/project_update_repository_storage_worker_spec.rb
@@ -9,33 +9,12 @@ describe ProjectUpdateRepositoryStorageWorker do
subject { described_class.new }
describe "#perform" do
- context 'when source and target repositories are on different filesystems' do
- before do
- allow(Gitlab::GitalyClient).to receive(:filesystem_id).with('default').and_call_original
- allow(Gitlab::GitalyClient).to receive(:filesystem_id).with('new_storage').and_return(SecureRandom.uuid)
+ it "calls the update repository storage service" do
+ expect_next_instance_of(Projects::UpdateRepositoryStorageService) do |instance|
+ expect(instance).to receive(:execute).with('new_storage')
end
- it "calls the update repository storage service" do
- expect_next_instance_of(Projects::UpdateRepositoryStorageService) do |instance|
- expect(instance).to receive(:execute).with('new_storage')
- end
-
- subject.perform(project.id, 'new_storage')
- end
- end
-
- context 'when source and target repositories are on the same filesystems' do
- let(:filesystem_id) { SecureRandom.uuid }
-
- before do
- allow(Gitlab::GitalyClient).to receive(:filesystem_id).and_return(filesystem_id)
- end
-
- it 'raises an error' do
- expect_any_instance_of(::Projects::UpdateRepositoryStorageService).not_to receive(:new)
-
- expect { subject.perform(project.id, 'new_storage') }.to raise_error(ProjectUpdateRepositoryStorageWorker::SameFilesystemError)
- end
+ subject.perform(project.id, 'new_storage')
end
end
end