Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
915e6aa7
Commit
915e6aa7
authored
Mar 24, 2021
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes presence validation from cache config
parent
3a5369e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
lib/gitlab/ci/config/entry/cache.rb
lib/gitlab/ci/config/entry/cache.rb
+0
-2
spec/lib/gitlab/ci/config/entry/cache_spec.rb
spec/lib/gitlab/ci/config/entry/cache_spec.rb
+8
-0
No files found.
lib/gitlab/ci/config/entry/cache.rb
View file @
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'
)
...
...
spec/lib/gitlab/ci/config/entry/cache_spec.rb
View file @
915e6aa7
...
...
@@ -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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment