Commit 2fa3b984 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'instance-configuration-artifact-size' into 'master'

Display maximum artifact size from runtime config

See merge request gitlab-org/gitlab-ce!26784
parents 8122bc52 5725be95
...@@ -39,7 +39,7 @@ class InstanceConfiguration ...@@ -39,7 +39,7 @@ class InstanceConfiguration
def gitlab_ci def gitlab_ci
Settings.gitlab_ci Settings.gitlab_ci
.to_h .to_h
.merge(artifacts_max_size: { value: Settings.artifacts.max_size&.megabytes, .merge(artifacts_max_size: { value: Gitlab::CurrentSettings.max_artifacts_size.megabytes,
default: 100.megabytes }) default: 100.megabytes })
end end
......
---
title: Display maximum artifact size from runtime config
merge_request: 26784
author: Bastian Blank
type: fixed
...@@ -82,6 +82,13 @@ describe InstanceConfiguration do ...@@ -82,6 +82,13 @@ describe InstanceConfiguration do
it 'returns the key artifacts_max_size' do it 'returns the key artifacts_max_size' do
expect(gitlab_ci.keys).to include(:artifacts_max_size) expect(gitlab_ci.keys).to include(:artifacts_max_size)
end end
it 'returns the key artifacts_max_size with values' do
stub_application_setting(max_artifacts_size: 200)
expect(gitlab_ci[:artifacts_max_size][:default]).to eq(100.megabytes)
expect(gitlab_ci[:artifacts_max_size][:value]).to eq(200.megabytes)
end
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment