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
caf428b3
Commit
caf428b3
authored
Aug 11, 2020
by
Maxime Orefice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove file_type uniqueness for PipelineArtifact
parent
2f94aec4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
app/models/ci/pipeline_artifact.rb
app/models/ci/pipeline_artifact.rb
+1
-1
spec/models/ci/pipeline_artifact_spec.rb
spec/models/ci/pipeline_artifact_spec.rb
+0
-1
No files found.
app/models/ci/pipeline_artifact.rb
View file @
caf428b3
...
...
@@ -20,7 +20,7 @@ module Ci
validates
:pipeline
,
:project
,
:file_format
,
:file
,
presence:
true
validates
:file_store
,
presence:
true
,
inclusion:
{
in:
FILE_STORE_SUPPORTED
}
validates
:size
,
presence:
true
,
numericality:
{
less_than_or_equal_to:
FILE_SIZE_LIMIT
}
validates
:file_type
,
presence:
true
,
uniqueness:
{
scope:
[
:pipeline_id
]
}
validates
:file_type
,
presence:
true
enum
file_type:
{
code_coverage:
1
...
...
spec/models/ci/pipeline_artifact_spec.rb
View file @
caf428b3
...
...
@@ -19,7 +19,6 @@ RSpec.describe Ci::PipelineArtifact, type: :model do
it
{
is_expected
.
to
validate_presence_of
(
:file_format
)
}
it
{
is_expected
.
to
validate_presence_of
(
:size
)
}
it
{
is_expected
.
to
validate_presence_of
(
:file
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:file_type
).
scoped_to
([
:pipeline_id
]).
ignoring_case_sensitivity
}
context
'when attributes are valid'
do
it
'returns no errors'
do
...
...
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