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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
7b06acea
Commit
7b06acea
authored
Jul 01, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use nil for non-existing files rather than 0
parent
9d8dca08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
app/models/ci/build.rb
app/models/ci/build.rb
+3
-1
spec/requests/ci/api/builds_spec.rb
spec/requests/ci/api/builds_spec.rb
+1
-1
No files found.
app/models/ci/build.rb
View file @
7b06acea
...
@@ -382,7 +382,9 @@ module Ci
...
@@ -382,7 +382,9 @@ module Ci
private
private
def
update_artifacts_size
def
update_artifacts_size
self
.
artifacts_size
=
artifacts_file
.
size
self
.
artifacts_size
=
if
artifacts_file
.
exists?
artifacts_file
.
size
end
end
end
def
erase_trace!
def
erase_trace!
...
...
spec/requests/ci/api/builds_spec.rb
View file @
7b06acea
...
@@ -486,7 +486,7 @@ describe Ci::API::API do
...
@@ -486,7 +486,7 @@ describe Ci::API::API do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
build
.
artifacts_file
.
exists?
).
to
be_falsy
expect
(
build
.
artifacts_file
.
exists?
).
to
be_falsy
expect
(
build
.
artifacts_metadata
.
exists?
).
to
be_falsy
expect
(
build
.
artifacts_metadata
.
exists?
).
to
be_falsy
expect
(
build
.
artifacts_size
).
to
eq
(
0
)
expect
(
build
.
artifacts_size
).
to
be_nil
end
end
end
end
...
...
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