Commit 1901d88d authored by Dylan Griffith's avatar Dylan Griffith

Fix specs due to factory changes in :ci_runner from...

Fix specs due to factory changes in :ci_runner from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18901/pipelines
parent bd470703
......@@ -46,7 +46,7 @@ describe Ci::Build do
context 'for shared runner' do
before do
job.runner = create(:ci_runner, :shared)
job.runner = create(:ci_runner, :instance)
end
it do
......@@ -59,7 +59,7 @@ describe Ci::Build do
context 'with specific runner' do
before do
job.runner = create(:ci_runner, :specific)
job.runner = create(:ci_runner, :project)
end
it { is_expected.to be_falsey }
......
......@@ -592,8 +592,8 @@ describe Project do
describe '#any_runners_limit' do
let(:project) { create(:project, shared_runners_enabled: shared_runners_enabled) }
let(:specific_runner) { create(:ci_runner) }
let(:shared_runner) { create(:ci_runner, :shared) }
let(:specific_runner) { create(:ci_runner, :project) }
let(:shared_runner) { create(:ci_runner, :instance) }
context 'for shared runners enabled' do
let(:shared_runners_enabled) { true }
......
......@@ -4,7 +4,7 @@ describe Ci::RegisterJobService do
let!(:project) { create :project, shared_runners_enabled: false }
let!(:pipeline) { create :ci_empty_pipeline, project: project }
let!(:pending_build) { create :ci_build, pipeline: pipeline }
let(:shared_runner) { create(:ci_runner, :shared) }
let(:shared_runner) { create(:ci_runner, :instance) }
describe '#execute' do
context 'for project with shared runners when global minutes limit is set' do
......
......@@ -14,7 +14,7 @@ describe UpdateBuildMinutesService do
subject { described_class.new(project, nil).execute(build) }
context 'with shared runner' do
let(:runner) { create(:ci_runner, :shared) }
let(:runner) { create(:ci_runner, :instance) }
it "creates a statistics and sets duration" do
subject
......@@ -79,7 +79,7 @@ describe UpdateBuildMinutesService do
end
context 'for specific runner' do
let(:runner) { create(:ci_runner) }
let(:runner) { create(:ci_runner, :project) }
it "does not create statistics" do
subject
......
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