Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.0 on 2022-01-18 at 14:00 UTC+1 (a few minutes of down time)

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

Rename `ProjectBuildStatus` -> `ProjectPipelineStatus`

parent b1b42a4f3504
......@@ -393,7 +393,7 @@ def detailed_status(current_user)
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 @@ def running_or_pending_build_count(force: false)
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 "#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 @@ def create_build(name, stage_idx)
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 @@ def enable_lfs
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