BigW Consortium Gitlab

Commit 84fa0610 by Dylan Griffith

Ensure runner_type is updated correctly when assigning shared runner to project

parent 063b6b75
......@@ -108,7 +108,11 @@ module Ci
end
def assign_to(project, current_user = nil)
if shared?
self.is_shared = false if shared?
self.runner_type = :project_type
end
self.save
project.runner_projects.create(runner_id: self.id)
end
......
......@@ -207,6 +207,7 @@ describe Ci::Runner do
end
it { expect(shared_runner).to be_specific }
it { expect(shared_runner).to be_project_type }
it { expect(shared_runner.projects).to eq([project]) }
it { expect(shared_runner.only_for?(project)).to be_truthy }
end
......
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