summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-06-19 19:56:27 +0200
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-06-27 12:47:44 +0200
commit4447006832d8955f371e2430988e0c95b20f155d (patch)
tree0d82fa7332f47bc79b647c77161f3c02237f93f4 /spec
parent9c7bf123564ee3c045c2aa3625f8a691f91a23aa (diff)
downloadgitlab-ce-4447006832d8955f371e2430988e0c95b20f155d.tar.gz
Split pipelines by origin on usage datazj-usage-ping-only-gl-pipelines
When sending the usage data, it now includes all pipelines. This commit will split the pipelines in two; internal and external. This will lead to historical data being incorrectly marked this way. Fixes gitlab-org/gitlab-ce#33172
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb3
-rw-r--r--spec/models/ci/pipeline_spec.rb6
2 files changed, 8 insertions, 1 deletions
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index b47e1b56fa9..9196d0ccc3f 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -30,7 +30,8 @@ describe Gitlab::UsageData do
expect(count_data.keys).to match_array(%i(
boards
ci_builds
- ci_pipelines
+ ci_internal_pipelines
+ ci_external_pipelines
ci_runners
ci_triggers
ci_pipeline_schedules
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index dab8e8ca432..55d85a6e228 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -672,6 +672,12 @@ describe Ci::Pipeline, models: true do
end
end
+ describe '.internal_sources' do
+ subject { described_class.internal_sources }
+
+ it { is_expected.to be_an(Array) }
+ end
+
describe '#status' do
let(:build) do
create(:ci_build, :created, pipeline: pipeline, name: 'test')