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

Rename `ProjectBuildStatus` -> `ProjectPipelineStatus`

parent a6d31300
......@@ -393,7 +393,7 @@ module Ci
end
def refresh_project_build_status_cache
Gitlab::Cache::Ci::ProjectBuildStatus.update_for_pipeline(self)
Gitlab::Cache::Ci::ProjectPipelineStatus.update_for_pipeline(self)
end
private
......
......@@ -1197,7 +1197,7 @@ class Project < ActiveRecord::Base
end
def pipeline_status
@pipeline_status ||= Gitlab::Cache::Ci::ProjectBuildStatus.load_for_project(self)
@pipeline_status ||= Gitlab::Cache::Ci::ProjectPipelineStatus.load_for_project(self)
end
def mark_import_as_failed(error_message)
......
......@@ -4,7 +4,7 @@
module Gitlab
module Cache
module Ci
class ProjectBuildStatus
class ProjectPipelineStatus
attr_accessor :sha, :status, :project, :loaded
delegate :commit, to: :project
......
......@@ -19,7 +19,7 @@ describe CiStatusHelper do
describe "#pipeline_status_cache_key" 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),
sha: "123abc",
status: "success"
......
require 'spec_helper'
describe Gitlab::Cache::Ci::ProjectBuildStatus do
describe Gitlab::Cache::Ci::ProjectPipelineStatus do
let(:project) { create(:project) }
let(:pipeline_status) { described_class.new(project) }
......
......@@ -1083,7 +1083,7 @@ describe Ci::Pipeline, models: true do
let(:pipeline) { create(:ci_pipeline, sha: '123456') }
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)
pipeline.block
......
......@@ -1949,7 +1949,7 @@ describe Project, models: true do
describe '#pipeline_status' do
let(:project) { create(:project) }
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
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