Skip to content
Snippets Groups Projects
Commit ae992c6a authored by Grzegorz Bizon's avatar Grzegorz Bizon Committed by Filipa Lacerda
Browse files

Merge branch 'add-runner-type-to-cluster-app' into 'master'

Set `runner_type` for cluster/application

See merge request gitlab-org/gitlab-ce!18832
parent 7c3c0685
No related merge requests found
......@@ -43,12 +43,20 @@ def ensure_runner
def create_and_assign_runner
transaction do
project.runners.create!(name: 'kubernetes-cluster', tag_list: %w(kubernetes cluster)).tap do |runner|
project.runners.create!(runner_create_params).tap do |runner|
update!(runner_id: runner.id)
end
end
end
def runner_create_params
{
name: 'kubernetes-cluster',
runner_type: :project_type,
tag_list: %w(kubernetes cluster)
}
end
def gitlab_url
Gitlab::Routing.url_helpers.root_url(only_path: false)
end
......
......@@ -74,9 +74,8 @@
it 'assigns the new runner to runner' do
subject
gitlab_runner.reload
expect(gitlab_runner.runner).not_to be_nil
expect(gitlab_runner.reload.runner).to be_project_type
end
end
......
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