diff options
| author | Leandro Camargo <leandroico@gmail.com> | 2017-01-25 01:48:03 -0200 |
|---|---|---|
| committer | Leandro Camargo <leandroico@gmail.com> | 2017-01-25 01:48:03 -0200 |
| commit | 1c24c79a83bff0d1535d813eb8146fc799d5d8ac (patch) | |
| tree | 5bab595dcf27c537391262691fa93a8fae949893 | |
| parent | 441a9beec3e6834d3fe5e047e65c4d8b32ff86d5 (diff) | |
| download | gitlab-ce-1c24c79a83bff0d1535d813eb8146fc799d5d8ac.tar.gz | |
Be more lenient on build coverage value updates and fix specs
| -rw-r--r-- | app/models/ci/build.rb | 2 | ||||
| -rw-r--r-- | spec/lib/gitlab/import_export/safe_model_attributes.yml | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 62fec28d2d5..b1f77bf242c 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -276,7 +276,7 @@ module Ci def update_coverage coverage = extract_coverage(trace, coverage_regex) - update_attributes(coverage: coverage) if coverage.is_a?(Numeric) + update_attributes(coverage: coverage) if coverage.present? end def extract_coverage(text, regex) diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index 493bc2db21a..95b230e4f5c 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -222,6 +222,7 @@ CommitStatus: - queued_at - token - lock_version +- coverage_regex Ci::Variable: - id - project_id |
