Commit 02072e17 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Rename `ProjectBuildStatus` -> `ProjectPipelineStatus`

parent a6d31300
...@@ -393,7 +393,7 @@ module Ci ...@@ -393,7 +393,7 @@ module Ci
end end
def refresh_project_build_status_cache def refresh_project_build_status_cache
Gitlab::Cache::Ci::ProjectBuildStatus.update_for_pipeline(self) Gitlab::Cache::Ci::ProjectPipelineStatus.update_for_pipeline(self)
end end
private private
......
...@@ -1197,7 +1197,7 @@ class Project < ActiveRecord::Base ...@@ -1197,7 +1197,7 @@ class Project < ActiveRecord::Base
end end
def pipeline_status def pipeline_status
@pipeline_status ||= Gitlab::Cache::Ci::ProjectBuildStatus.load_for_project(self) @pipeline_status ||= Gitlab::Cache::Ci::ProjectPipelineStatus.load_for_project(self)
end end
def mark_import_as_failed(error_message) def mark_import_as_failed(error_message)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
module Gitlab module Gitlab
module Cache module Cache
module Ci module Ci
class ProjectBuildStatus class ProjectPipelineStatus
attr_accessor :sha, :status, :project, :loaded attr_accessor :sha, :status, :project, :loaded
delegate :commit, to: :project delegate :commit, to: :project
......
...@@ -19,7 +19,7 @@ describe CiStatusHelper do ...@@ -19,7 +19,7 @@ describe CiStatusHelper do
describe "#pipeline_status_cache_key" do describe "#pipeline_status_cache_key" do
it "builds a cache key for pipeline status" do it "builds a cache key for pipeline status" do
pipeline_status = Gitlab::Cache::Ci::ProjectBuildStatus.new( pipeline_status = Gitlab::Cache::Ci::ProjectPipelineStatus.new(
build(:project), build(:project),
sha: "123abc", sha: "123abc",
status: "success" status: "success"
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Cache::Ci::ProjectBuildStatus do describe Gitlab::Cache::Ci::ProjectPipelineStatus do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:pipeline_status) { described_class.new(project) } let(:pipeline_status) { described_class.new(project) }
......
...@@ -1083,7 +1083,7 @@ describe Ci::Pipeline, models: true do ...@@ -1083,7 +1083,7 @@ describe Ci::Pipeline, models: true do
let(:pipeline) { create(:ci_pipeline, sha: '123456') } let(:pipeline) { create(:ci_pipeline, sha: '123456') }
it 'updates the cached status' do it 'updates the cached status' do
expect(Gitlab::Cache::Ci::ProjectBuildStatus).to receive(:update_for_pipeline). expect(Gitlab::Cache::Ci::ProjectPipelineStatus).to receive(:update_for_pipeline).
with(pipeline) with(pipeline)
pipeline.block pipeline.block
......
...@@ -1949,7 +1949,7 @@ describe Project, models: true do ...@@ -1949,7 +1949,7 @@ describe Project, models: true do
describe '#pipeline_status' do describe '#pipeline_status' do
let(:project) { create(:project) } let(:project) { create(:project) }
it 'builds a pipeline status' do it 'builds a pipeline status' do
expect(project.pipeline_status).to be_a(Gitlab::Cache::Ci::ProjectBuildStatus) expect(project.pipeline_status).to be_a(Gitlab::Cache::Ci::ProjectPipelineStatus)
end end
it 'hase a loaded pipeline status' do it 'hase a loaded pipeline status' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment