diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-09-07 14:02:17 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-09-07 14:02:17 +0000 |
commit | 7f2b287f6622dd5052da369a8e83fd6707d96173 (patch) | |
tree | d926c77b1a1e22ff0efba617d7de7fd697a16dea /spec/lib | |
parent | f4d3f81b954f29f5c9df16b1eeddc35b4d2b9700 (diff) | |
parent | 965ff14b6fec206d81e2a94fceddd0eda3dfed3a (diff) | |
download | gitlab-ce-7f2b287f6622dd5052da369a8e83fd6707d96173.tar.gz |
Merge branch 'osw-send-max-patch-bytes-to-gitaly' into 'master'
Send max_patch_bytes to Gitaly via Gitaly::CommitDiffRequest
Closes #50635
See merge request gitlab-org/gitlab-ce!21575
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/gitaly_client/commit_service_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/lib/gitlab/gitaly_client/commit_service_spec.rb b/spec/lib/gitlab/gitaly_client/commit_service_spec.rb index 54f2ea33f90..bcdf12a00a0 100644 --- a/spec/lib/gitlab/gitaly_client/commit_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/commit_service_spec.rb @@ -19,7 +19,14 @@ describe Gitlab::GitalyClient::CommitService do right_commit_id: commit.id, collapse_diffs: false, enforce_limits: true, - **Gitlab::Git::DiffCollection.collection_limits.to_h + # Tests limitation parameters explicitly + max_files: 100, + max_lines: 5000, + max_bytes: 512000, + safe_max_files: 100, + safe_max_lines: 5000, + safe_max_bytes: 512000, + max_patch_bytes: 102400 ) expect_any_instance_of(Gitaly::DiffService::Stub).to receive(:commit_diff).with(request, kind_of(Hash)) @@ -37,7 +44,14 @@ describe Gitlab::GitalyClient::CommitService do right_commit_id: initial_commit.id, collapse_diffs: false, enforce_limits: true, - **Gitlab::Git::DiffCollection.collection_limits.to_h + # Tests limitation parameters explicitly + max_files: 100, + max_lines: 5000, + max_bytes: 512000, + safe_max_files: 100, + safe_max_lines: 5000, + safe_max_bytes: 512000, + max_patch_bytes: 102400 ) expect_any_instance_of(Gitaly::DiffService::Stub).to receive(:commit_diff).with(request, kind_of(Hash)) |