diff options
Diffstat (limited to 'spec/tooling/danger')
-rw-r--r-- | spec/tooling/danger/product_intelligence_spec.rb | 22 | ||||
-rw-r--r-- | spec/tooling/danger/project_helper_spec.rb | 35 |
2 files changed, 18 insertions, 39 deletions
diff --git a/spec/tooling/danger/product_intelligence_spec.rb b/spec/tooling/danger/product_intelligence_spec.rb index 17ef67e64fe..4ab911b6590 100644 --- a/spec/tooling/danger/product_intelligence_spec.rb +++ b/spec/tooling/danger/product_intelligence_spec.rb @@ -12,7 +12,7 @@ RSpec.describe Tooling::Danger::ProductIntelligence do subject(:product_intelligence) { fake_danger.new(helper: fake_helper) } let(:fake_danger) { DangerSpecHelper.fake_danger.include(described_class) } - let(:changed_files) { ['metrics/counts_7d/test_metric.yml', 'doc/development/usage_ping/dictionary.md'] } + let(:changed_files) { ['metrics/counts_7d/test_metric.yml'] } let(:changed_lines) { ['+tier: ee'] } before do @@ -20,22 +20,6 @@ RSpec.describe Tooling::Danger::ProductIntelligence do allow(fake_helper).to receive(:changed_lines).and_return(changed_lines) end - describe '#need_dictionary_changes?' do - subject { product_intelligence.need_dictionary_changes? } - - context 'when changed files do not contain dictionary changes' do - let(:changed_files) { ['config/metrics/counts_7d/test_metric.yml'] } - - it { is_expected.to be true } - end - - context 'when changed files already contains dictionary changes' do - let(:changed_files) { ['doc/development/usage_ping/dictionary.md'] } - - it { is_expected.to be false } - end - end - describe '#missing_labels' do subject { product_intelligence.missing_labels } @@ -109,10 +93,6 @@ RSpec.describe Tooling::Danger::ProductIntelligence do end end - context 'with dictionary file not changed' do - it { is_expected.to be_empty } - end - context 'with metrics files changed' do let(:changed_files) { ['config/metrics/counts_7d/test_metric.yml', 'ee/config/metrics/counts_7d/ee_metric.yml'] } diff --git a/spec/tooling/danger/project_helper_spec.rb b/spec/tooling/danger/project_helper_spec.rb index 8bcfac5a699..f52c5e02544 100644 --- a/spec/tooling/danger/project_helper_spec.rb +++ b/spec/tooling/danger/project_helper_spec.rb @@ -77,7 +77,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do 'ee/spec/frontend/bar' | [:frontend] 'ee/spec/frontend_integration/bar' | [:frontend] - '.gitlab/ci/frontend.gitlab-ci.yml' | %i[frontend engineering_productivity] + '.gitlab/ci/frontend.gitlab-ci.yml' | %i[frontend tooling] 'app/models/foo' | [:backend] 'bin/foo' | [:backend] @@ -113,22 +113,22 @@ RSpec.describe Tooling::Danger::ProjectHelper do 'Rakefile' | [:backend] 'FOO_VERSION' | [:backend] - 'Dangerfile' | [:engineering_productivity] - 'danger/bundle_size/Dangerfile' | [:engineering_productivity] - 'ee/danger/bundle_size/Dangerfile' | [:engineering_productivity] - 'danger/bundle_size/' | [:engineering_productivity] - 'ee/danger/bundle_size/' | [:engineering_productivity] - '.gitlab-ci.yml' | [:engineering_productivity] - '.gitlab/ci/cng.gitlab-ci.yml' | [:engineering_productivity] - '.gitlab/ci/ee-specific-checks.gitlab-ci.yml' | [:engineering_productivity] - 'scripts/foo' | [:engineering_productivity] - 'tooling/danger/foo' | [:engineering_productivity] - 'ee/tooling/danger/foo' | [:engineering_productivity] - 'lefthook.yml' | [:engineering_productivity] - '.editorconfig' | [:engineering_productivity] - 'tooling/bin/find_foss_tests' | [:engineering_productivity] - '.codeclimate.yml' | [:engineering_productivity] - '.gitlab/CODEOWNERS' | [:engineering_productivity] + 'Dangerfile' | [:tooling] + 'danger/bundle_size/Dangerfile' | [:tooling] + 'ee/danger/bundle_size/Dangerfile' | [:tooling] + 'danger/bundle_size/' | [:tooling] + 'ee/danger/bundle_size/' | [:tooling] + '.gitlab-ci.yml' | [:tooling] + '.gitlab/ci/cng.gitlab-ci.yml' | [:tooling] + '.gitlab/ci/ee-specific-checks.gitlab-ci.yml' | [:tooling] + 'scripts/foo' | [:tooling] + 'tooling/danger/foo' | [:tooling] + 'ee/tooling/danger/foo' | [:tooling] + 'lefthook.yml' | [:tooling] + '.editorconfig' | [:tooling] + 'tooling/bin/find_foss_tests' | [:tooling] + '.codeclimate.yml' | [:tooling] + '.gitlab/CODEOWNERS' | [:tooling] 'lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml' | [:ci_template] 'lib/gitlab/ci/templates/dotNET-Core.yml' | [:ci_template] @@ -177,7 +177,6 @@ RSpec.describe Tooling::Danger::ProjectHelper do 'ee/config/metrics/counts_7d/20210216174919_g_analytics_issues_weekly.yml' | [:product_intelligence] 'lib/gitlab/usage_data_counters/aggregated_metrics/common.yml' | [:product_intelligence] 'lib/gitlab/usage_data_counters/hll_redis_counter.rb' | [:backend, :product_intelligence] - 'doc/development/usage_ping/dictionary.md' | [:docs, :product_intelligence] 'lib/gitlab/tracking.rb' | [:backend, :product_intelligence] 'spec/lib/gitlab/tracking_spec.rb' | [:backend, :product_intelligence] 'app/helpers/tracking_helper.rb' | [:backend, :product_intelligence] |