diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-06-28 20:37:46 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-06-28 20:37:46 +0800 |
commit | 1bc0d732f604d7a4a616ba34b8ccbb1987038951 (patch) | |
tree | 35820aa788c8763632644edf0dc254dbf00015ef | |
parent | de543359580ffdd67113e36fba80b3e1bd2262c2 (diff) | |
download | gitlab-ce-1bc0d732f604d7a4a616ba34b8ccbb1987038951.tar.gz |
Also remove ci_builds.artifacts_size when erased
-rw-r--r-- | app/models/ci/build.rb | 1 | ||||
-rw-r--r-- | spec/requests/ci/api/builds_spec.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 2588274355b..0f8c9511ce1 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -340,6 +340,7 @@ module Ci def erase_artifacts! remove_artifacts_file! remove_artifacts_metadata! + self.artifacts_size = nil save end diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb index 08ec154dd5d..de1ec8fd40d 100644 --- a/spec/requests/ci/api/builds_spec.rb +++ b/spec/requests/ci/api/builds_spec.rb @@ -482,6 +482,7 @@ describe Ci::API::API do expect(response).to have_http_status(200) expect(build.artifacts_file.exists?).to be_falsy expect(build.artifacts_metadata.exists?).to be_falsy + expect(build.artifacts_size).to be_falsy end end |