Commit 5624ff09 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'lm-remove-cache-presence-validation' into 'master'

Removes presence validation from cache config

See merge request gitlab-org/gitlab!57405
parents 6c29be7e 915e6aa7
......@@ -17,8 +17,6 @@ module Gitlab
MULTIPLE_CACHE_LIMIT = 4
validations do
validates :config, presence: true
validate do
unless config.is_a?(Hash) || config.is_a?(Array)
errors.add(:config, 'can only be a Hash or an Array')
......
......@@ -13,6 +13,14 @@ RSpec.describe Gitlab::Ci::Config::Entry::Cache do
end
describe '#valid?' do
context 'with an empty hash as cache' do
let(:config) { {} }
it 'is valid' do
expect(entry).to be_valid
end
end
context 'when configuration is valid with a single cache' do
let(:config) { { key: 'key', paths: ["logs/"], untracked: true } }
......
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