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-03-18 00:09:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 00:09:16 +0300
commit154b9bae142ba15fec753f44327654595094b879 (patch)
tree027f8ae024961778d5b00c77a72fe302f985d4f3 /spec/lib/gitlab/shell_spec.rb
parent2c156e3c7bbade01c36eee18327f1ced6eebea79 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/shell_spec.rb')
-rw-r--r--spec/lib/gitlab/shell_spec.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/spec/lib/gitlab/shell_spec.rb b/spec/lib/gitlab/shell_spec.rb
index 3ea9f71d3a6..e4c33863ac2 100644
--- a/spec/lib/gitlab/shell_spec.rb
+++ b/spec/lib/gitlab/shell_spec.rb
@@ -9,7 +9,6 @@ describe Gitlab::Shell do
let(:gitlab_shell) { described_class.new }
it { is_expected.to respond_to :remove_repository }
- it { is_expected.to respond_to :fork_repository }
describe '.url_to_repo' do
let(:full_path) { 'diaspora/disaspora-rails' }
@@ -95,52 +94,6 @@ describe Gitlab::Shell do
expect(TestEnv.storage_dir_exists?(project2.repository_storage, "#{project2.disk_path}.git")).to be(true)
end
end
-
- describe '#fork_repository' do
- let(:target_project) { create(:project) }
-
- subject do
- gitlab_shell.fork_repository(project, target_project)
- end
-
- it 'returns true when the command succeeds' do
- expect_any_instance_of(Gitlab::GitalyClient::RepositoryService).to receive(:fork_repository)
- .with(repository.raw_repository) { :gitaly_response_object }
-
- is_expected.to be_truthy
- end
-
- it 'return false when the command fails' do
- expect_any_instance_of(Gitlab::GitalyClient::RepositoryService).to receive(:fork_repository)
- .with(repository.raw_repository) { raise GRPC::BadStatus, 'bla' }
-
- is_expected.to be_falsy
- end
- end
-
- describe '#import_repository' do
- let(:import_url) { 'https://gitlab.com/gitlab-org/gitlab-foss.git' }
-
- context 'with gitaly' do
- it 'returns true when the command succeeds' do
- expect_any_instance_of(Gitlab::GitalyClient::RepositoryService).to receive(:import_repository).with(import_url)
-
- result = gitlab_shell.import_repository(project.repository_storage, project.disk_path, import_url, project.full_path)
-
- expect(result).to be_truthy
- end
-
- it 'raises an exception when the command fails' do
- expect_any_instance_of(Gitlab::GitalyClient::RepositoryService).to receive(:import_repository)
- .with(import_url) { raise GRPC::BadStatus, 'bla' }
- expect_any_instance_of(Gitlab::Shell::GitalyGitlabProjects).to receive(:output) { 'error'}
-
- expect do
- gitlab_shell.import_repository(project.repository_storage, project.disk_path, import_url, project.full_path)
- end.to raise_error(Gitlab::Shell::Error, "error")
- end
- end
- end
end
describe 'namespace actions' do