summaryrefslogtreecommitdiff
path: root/spec/requests/api/admin/ci
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /spec/requests/api/admin/ci
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
downloadgitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/requests/api/admin/ci')
-rw-r--r--spec/requests/api/admin/ci/variables_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/requests/api/admin/ci/variables_spec.rb b/spec/requests/api/admin/ci/variables_spec.rb
index 812ee93ad21..f89964411f8 100644
--- a/spec/requests/api/admin/ci/variables_spec.rb
+++ b/spec/requests/api/admin/ci/variables_spec.rb
@@ -110,20 +110,19 @@ RSpec.describe ::API::Admin::Ci::Variables do
expect(response).to have_gitlab_http_status(:bad_request)
end
- it 'does not allow values above 700 characters' do
+ it 'does not allow values above 10,000 characters' do
too_long_message = <<~MESSAGE.strip
- The encrypted value of the provided variable exceeds 1024 bytes. \
- Variables over 700 characters risk exceeding the limit.
+ The value of the provided variable exceeds the 10000 character limit
MESSAGE
expect do
post api('/admin/ci/variables', admin),
- params: { key: 'too_long', value: SecureRandom.hex(701) }
+ params: { key: 'too_long', value: SecureRandom.hex(10_001) }
end.not_to change { ::Ci::InstanceVariable.count }
expect(response).to have_gitlab_http_status(:bad_request)
expect(json_response).to match('message' =>
- a_hash_including('encrypted_value' => [too_long_message]))
+ a_hash_including('value' => [too_long_message]))
end
end