Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-07-04 13:39:28 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-07-04 13:39:28 +0300
commit48bbb36347c1c5d4d7922e1998c47d235eb71208 (patch)
treed24a0587b1fed960aa5c8060d32aab1b8028b124 /spec/models/ci
parentd026441b3c68e682a136d09d68b18fa0a73684fe (diff)
parentd3bcb06dc6365129b62dadf49efc58daecd39a83 (diff)
Merge branch 'remove-is-shared-from-ci-runners' into 'master'
Remove the use of `is_shared` of `Ci::Runner` See merge request gitlab-org/gitlab-ce!20172
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/runner_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb
index f6433234573..953af2c4710 100644
--- a/spec/models/ci/runner_spec.rb
+++ b/spec/models/ci/runner_spec.rb
@@ -105,7 +105,7 @@ describe Ci::Runner do
end
end
- describe '.shared' do
+ describe '.instance_type' do
let(:group) { create(:group) }
let(:project) { create(:project) }
let!(:group_runner) { create(:ci_runner, :group, groups: [group]) }
@@ -113,7 +113,7 @@ describe Ci::Runner do
let!(:shared_runner) { create(:ci_runner, :instance) }
it 'returns only shared runners' do
- expect(described_class.shared).to contain_exactly(shared_runner)
+ expect(described_class.instance_type).to contain_exactly(shared_runner)
end
end
@@ -155,7 +155,7 @@ describe Ci::Runner do
end
end
- describe '.owned_or_shared' do
+ describe '.owned_or_instance_wide' do
it 'returns a globally shared, a project specific and a group specific runner' do
# group specific
group = create(:group)
@@ -168,7 +168,7 @@ describe Ci::Runner do
# globally shared
shared_runner = create(:ci_runner, :instance)
- expect(described_class.owned_or_shared(project.id)).to contain_exactly(
+ expect(described_class.owned_or_instance_wide(project.id)).to contain_exactly(
group_runner, project_runner, shared_runner
)
end
@@ -202,7 +202,6 @@ describe Ci::Runner do
it 'transitions shared runner to project runner and assigns project' do
expect(subject).to be_truthy
- expect(runner).to be_specific
expect(runner).to be_project_type
expect(runner.projects).to eq([project])
expect(runner.only_for?(project)).to be_truthy