diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-04 12:44:05 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-04 12:44:05 +0300 |
commit | 04d07cc5b4177132d3dcf0afb1729314a4b284cb (patch) | |
tree | 4fd3fb55a40f7d5253b1106edecc52821a2928c7 /spec/features/admin | |
parent | bee5e26e2d84ce514f2fbedd05bd6e70271142b2 (diff) | |
parent | 11f38dd12abedf17c09098170de295ce0b533d3b (diff) |
Merge branch 'feature/runner-per-group' into 'master'
Shared CI runners for groups
See merge request gitlab-org/gitlab-ce!9646
Diffstat (limited to 'spec/features/admin')
-rw-r--r-- | spec/features/admin/admin_runners_spec.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb index 8de2e3d199b..3465ccfc423 100644 --- a/spec/features/admin/admin_runners_spec.rb +++ b/spec/features/admin/admin_runners_spec.rb @@ -59,6 +59,47 @@ describe "Admin Runners" do expect(page).to have_text 'No runners found' end end + + context 'group runner' do + let(:group) { create(:group) } + let!(:runner) { create(:ci_runner, groups: [group], runner_type: :group_type) } + + it 'shows the label and does not show the project count' do + visit admin_runners_path + + within "#runner_#{runner.id}" do + expect(page).to have_selector '.label', text: 'group' + expect(page).to have_text 'n/a' + end + end + end + + context 'shared runner' do + it 'shows the label and does not show the project count' do + runner = create :ci_runner, :shared + + visit admin_runners_path + + within "#runner_#{runner.id}" do + expect(page).to have_selector '.label', text: 'shared' + expect(page).to have_text 'n/a' + end + end + end + + context 'specific runner' do + it 'shows the label and the project count' do + project = create :project + runner = create :ci_runner, projects: [project] + + visit admin_runners_path + + within "#runner_#{runner.id}" do + expect(page).to have_selector '.label', text: 'specific' + expect(page).to have_text '1' + end + end + end end describe "Runner show page" do |