diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-11 12:03:40 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-31 10:46:19 +0200 |
commit | ab489d293d6ee3e30673817ce4652c7b413988c0 (patch) | |
tree | e197ccd80fefd1f4ae610e96efeebf139c69b302 /spec/features | |
parent | ec1d3e104afddf7c8a5f6f5d8bf1ffee99a8f551 (diff) | |
download | gitlab-ce-ab489d293d6ee3e30673817ce4652c7b413988c0.tar.gz |
Improve runner_type validations for Ci::Runner
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_runners_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/runners_spec.rb | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb index c33014cbb31..5c9bad8fb2c 100644 --- a/spec/features/admin/admin_runners_spec.rb +++ b/spec/features/admin/admin_runners_spec.rb @@ -62,7 +62,7 @@ describe "Admin Runners" do context 'group runner' do let(:group) { create(:group) } - let!(:runner) { create(:ci_runner, groups: [group], runner_type: :group_type) } + let!(:runner) { create(:ci_runner, :group, groups: [group]) } it 'shows the label and does not show the project count' do visit admin_runners_path diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb index e0cd963fe39..f905e6d4f5e 100644 --- a/spec/features/runners_spec.rb +++ b/spec/features/runners_spec.rb @@ -28,8 +28,8 @@ feature 'Runners' do project.add_master(user) end - context 'when a specific runner is activated on the project' do - given(:specific_runner) { create(:ci_runner, :specific) } + context 'when a project_type runner is activated on the project' do + given(:specific_runner) { create(:ci_runner, :project) } background do project.runners << specific_runner @@ -114,7 +114,7 @@ feature 'Runners' do end context 'when a shared runner is activated on the project' do - given!(:shared_runner) { create(:ci_runner, :shared) } + given!(:shared_runner) { create(:ci_runner, :instance) } scenario 'user sees CI/CD setting page' do visit project_runners_path(project) @@ -126,7 +126,7 @@ feature 'Runners' do context 'when a specific runner exists in another project' do given(:another_project) { create(:project) } - given(:specific_runner) { create(:ci_runner, :specific) } + given(:specific_runner) { create(:ci_runner, :project) } background do another_project.add_master(user) @@ -220,8 +220,8 @@ feature 'Runners' do end context 'project with a group but no group runner' do - given(:group) { create :group } - given(:project) { create :project, group: group } + given(:group) { create(:group) } + given(:project) { create(:project, group: group) } scenario 'group runners are not available' do visit project_runners_path(project) @@ -234,9 +234,9 @@ feature 'Runners' do end context 'project with a group and a group runner' do - given(:group) { create :group } - given(:project) { create :project, group: group } - given!(:ci_runner) { create :ci_runner, groups: [group], description: 'group-runner' } + given(:group) { create(:group) } + given(:project) { create(:project, group: group) } + given!(:ci_runner) { create(:ci_runner, :group, groups: [group], description: 'group-runner') } scenario 'group runners are available' do visit project_runners_path(project) @@ -263,7 +263,7 @@ feature 'Runners' do end context 'group runners in group settings' do - given(:group) { create :group } + given(:group) { create(:group) } background do group.add_master(user) end @@ -277,7 +277,7 @@ feature 'Runners' do end context 'group with a runner' do - let!(:runner) { create :ci_runner, groups: [group], description: 'group-runner' } + let!(:runner) { create(:ci_runner, :group, groups: [group], description: 'group-runner') } scenario 'the runner is visible' do visit group_settings_ci_cd_path(group) |