diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-23 12:06:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-23 12:06:03 +0300 |
commit | b3e4ec8e8adf4fe96c982124e91b6a05021a9cda (patch) | |
tree | 5fda0011a7cc7de000186e465e61f893d478a1c8 /spec/services/projects | |
parent | 90cdc9391171e1be29b2b57a2e2aad0c02c2a7a9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/after_rename_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/projects/destroy_service_spec.rb | 18 | ||||
-rw-r--r-- | spec/services/projects/fork_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/projects/update_service_spec.rb | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/spec/services/projects/after_rename_service_spec.rb b/spec/services/projects/after_rename_service_spec.rb index 8585d495ffb..bf637b70aaf 100644 --- a/spec/services/projects/after_rename_service_spec.rb +++ b/spec/services/projects/after_rename_service_spec.rb @@ -222,7 +222,7 @@ describe Projects::AfterRenameService do def expect_repository_exist(full_path_with_extension) expect( - gitlab_shell.exists?( + TestEnv.storage_dir_exists?( project.repository_storage, full_path_with_extension ) 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 diff --git a/spec/services/projects/fork_service_spec.rb b/spec/services/projects/fork_service_spec.rb index 7e7e80ca240..5a3796fec3d 100644 --- a/spec/services/projects/fork_service_spec.rb +++ b/spec/services/projects/fork_service_spec.rb @@ -79,7 +79,7 @@ describe Projects::ForkService do expect(fork_network.projects).to contain_exactly(@from_project, to_project) end - it 'imports the repository of the forked project' do + it 'imports the repository of the forked project', :sidekiq_might_not_need_inline do to_project = fork_project(@from_project, @to_user, repository: true) expect(to_project.empty_repo?).to be_falsy diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index 31bd0f0f836..c848a5397e1 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -151,7 +151,7 @@ describe Projects::UpdateService do context 'when we update project but not enabling a wiki' do it 'does not try to create an empty wiki' do - Gitlab::Shell.new.rm_directory(project.repository_storage, project.wiki.path) + TestEnv.rm_storage_dir(project.repository_storage, project.wiki.path) result = update_project(project, user, { name: 'test1' }) @@ -172,7 +172,7 @@ describe Projects::UpdateService do context 'when enabling a wiki' do it 'creates a wiki' do project.project_feature.update(wiki_access_level: ProjectFeature::DISABLED) - Gitlab::Shell.new.rm_directory(project.repository_storage, project.wiki.path) + TestEnv.rm_storage_dir(project.repository_storage, project.wiki.path) result = update_project(project, user, project_feature_attributes: { wiki_access_level: ProjectFeature::ENABLED }) |