diff options
Diffstat (limited to 'spec/requests/api/admin/ci/variables_spec.rb')
-rw-r--r-- | spec/requests/api/admin/ci/variables_spec.rb | 9 |
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 |