summaryrefslogtreecommitdiff
path: root/spec/services/projects/destroy_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/projects/destroy_service_spec.rb')
-rw-r--r--spec/services/projects/destroy_service_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/services/projects/destroy_service_spec.rb b/spec/services/projects/destroy_service_spec.rb
index 2331281bd8e..642986bb176 100644
--- a/spec/services/projects/destroy_service_spec.rb
+++ b/spec/services/projects/destroy_service_spec.rb
@@ -81,7 +81,7 @@ describe Projects::DestroyService do
end
let!(:async) { true }
- it 'destroys them' do
+ it 'destroys them', :sidekiq_might_not_need_inline do
expect(RemoteMirror.count).to eq(0)
end
end
@@ -102,7 +102,7 @@ describe Projects::DestroyService do
end
let!(:async) { true }
- it 'destroys project and export' do
+ it 'destroys project and export', :sidekiq_might_not_need_inline do
expect { destroy_project(project_with_export, user) }.to change(ImportExportUpload, :count).by(-1)
expect(Project.all).not_to include(project_with_export)
@@ -153,7 +153,7 @@ describe Projects::DestroyService do
end
end
- context 'with async_execute' do
+ context 'with async_execute', :sidekiq_might_not_need_inline do
let(:async) { true }
context 'async delete of project with private issue visibility' do
@@ -346,21 +346,21 @@ describe Projects::DestroyService do
let(:path) { project.disk_path + '.git' }
before do
- expect(project.gitlab_shell.exists?(project.repository_storage, path)).to be_truthy
- expect(project.gitlab_shell.exists?(project.repository_storage, remove_path)).to be_falsey
+ expect(TestEnv.storage_dir_exists?(project.repository_storage, path)).to be_truthy
+ expect(TestEnv.storage_dir_exists?(project.repository_storage, remove_path)).to be_falsey
# Dont run sidekiq to check if renamed repository exists
Sidekiq::Testing.fake! { destroy_project(project, user, {}) }
- expect(project.gitlab_shell.exists?(project.repository_storage, path)).to be_falsey
- expect(project.gitlab_shell.exists?(project.repository_storage, remove_path)).to be_truthy
+ expect(TestEnv.storage_dir_exists?(project.repository_storage, path)).to be_falsey
+ expect(TestEnv.storage_dir_exists?(project.repository_storage, remove_path)).to be_truthy
end
it 'restores the repositories' do
Sidekiq::Testing.fake! { described_class.new(project, user).attempt_repositories_rollback }
- expect(project.gitlab_shell.exists?(project.repository_storage, path)).to be_truthy
- expect(project.gitlab_shell.exists?(project.repository_storage, remove_path)).to be_falsey
+ expect(TestEnv.storage_dir_exists?(project.repository_storage, path)).to be_truthy
+ expect(TestEnv.storage_dir_exists?(project.repository_storage, remove_path)).to be_falsey
end
end