diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/lib/gitlab/gitaly_client | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/lib/gitlab/gitaly_client')
4 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client/commit_service_spec.rb b/spec/lib/gitlab/gitaly_client/commit_service_spec.rb index 45a25ccfc88..9581b017839 100644 --- a/spec/lib/gitlab/gitaly_client/commit_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/commit_service_spec.rb @@ -266,6 +266,7 @@ RSpec.describe Gitlab::GitalyClient::CommitService do repository: repository_message, revision: revision ) end + let(:response) do Gitaly::CommitStatsResponse.new( oid: revision, diff --git a/spec/lib/gitlab/gitaly_client/conflicts_service_spec.rb b/spec/lib/gitlab/gitaly_client/conflicts_service_spec.rb index b016e8bdf5a..e90cb966917 100644 --- a/spec/lib/gitlab/gitaly_client/conflicts_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/conflicts_service_spec.rb @@ -35,6 +35,7 @@ RSpec.describe Gitlab::GitalyClient::ConflictsService do let(:files) do [{ old_path: 'some/path', new_path: 'some/path', content: '' }] end + let(:source_branch) { 'master' } let(:target_branch) { 'feature' } let(:commit_message) { 'Solving conflicts\n\nTést' } diff --git a/spec/lib/gitlab/gitaly_client/operation_service_spec.rb b/spec/lib/gitlab/gitaly_client/operation_service_spec.rb index 4e16f760235..b974f456914 100644 --- a/spec/lib/gitlab/gitaly_client/operation_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/operation_service_spec.rb @@ -20,11 +20,13 @@ RSpec.describe Gitlab::GitalyClient::OperationService do user: gitaly_user ) end + let(:gitaly_commit) { build(:gitaly_commit) } let(:commit_id) { gitaly_commit.id } let(:gitaly_branch) do Gitaly::Branch.new(name: branch_name, target_commit: gitaly_commit) end + let(:response) { Gitaly::UserCreateBranchResponse.new(branch: gitaly_branch) } let(:commit) { Gitlab::Git::Commit.new(repository, gitaly_commit) } @@ -68,6 +70,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do user: gitaly_user ) end + let(:response) { Gitaly::UserUpdateBranchResponse.new } subject { client.user_update_branch(branch_name, user, newrev, oldrev) } @@ -123,6 +126,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do user: gitaly_user ) end + let(:response) { Gitaly::UserDeleteBranchResponse.new } subject { client.user_delete_branch(branch_name, user) } @@ -162,6 +166,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do user: gitaly_user ) end + let(:branch_update) do Gitaly::OperationBranchUpdate.new( commit_id: source_sha, @@ -169,6 +174,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do branch_created: false ) end + let(:response) { Gitaly::UserFFBranchResponse.new(branch_update: branch_update) } before do @@ -303,6 +309,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do commit_message: commit_message ) end + let(:squash_sha) { 'f00' } let(:response) { Gitaly::UserSquashResponse.new(squash_sha: squash_sha) } @@ -375,6 +382,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do let(:patch_content) do patch_names.map { |name| File.read(File.join(patches_folder, name)) }.join("\n") end + let(:patch_names) { %w(0001-This-does-not-apply-to-the-feature-branch.patch) } let(:branch_name) { 'branch-with-patches' } diff --git a/spec/lib/gitlab/gitaly_client/wiki_service_spec.rb b/spec/lib/gitlab/gitaly_client/wiki_service_spec.rb index a06f8459963..8a169acb69c 100644 --- a/spec/lib/gitlab/gitaly_client/wiki_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/wiki_service_spec.rb @@ -18,6 +18,7 @@ RSpec.describe Gitlab::GitalyClient::WikiService do Gitaly::WikiFindPageResponse.new(page: Gitaly::WikiPage.new(raw_data: 'b')) ] end + let(:wiki_page) { subject.first } let(:wiki_page_version) { subject.last } @@ -60,6 +61,7 @@ RSpec.describe Gitlab::GitalyClient::WikiService do Gitaly::WikiGetAllPagesResponse.new(end_of_page: true) ] end + let(:wiki_page_1) { subject[0].first } let(:wiki_page_1_version) { subject[0].last } let(:wiki_page_2) { subject[1].first } |