Skip to content

Convert scripts/verify-tff-mapping into a spec

Peter Leitzen requested to merge pl-tests-yml-spec into master

What does this MR do and why?

This MR converts scripts/verify-tff-mapping into spec/tooling/tests_yml_spec.rb. It also remove the now unnecessary verify-tests-yml CI job.

Follow-up of !119340 (comment 1375414456).

How to set up and validate locally

tff -f tests.yml tests.yml

bin/rspec $(tff -f tests.yml tests.yml)

Verify that all checks were converted properly

# Before
git checkout master
rg -o -r '$1'  "^\s*source: (.*)" scripts/verify-tff-mapping > before

# After
git checkout pl-tests-yml-spec
rg -o -r '$1'  "^\s*source: (.*)" spec/tooling/tests_yml_spec.rb > after

# Diff
diff -u before after
# no output - MATCHES
List
'ee/app/controllers/admin/licenses_controller.rb',
'app/finders/admin/projects_finder.rb',
'ee/app/finders/ee/projects_finder.rb',
'ee/lib/world.rb',
'lib/gitaly/server.rb',
'lib/gitlab/usage_data_counters/foo.rb',
'lib/gitlab/ci/config/base.rb',
'ee/lib/gitlab/ci/config/base.rb',
'tooling/danger/specs/project_factory_suggestion.rb',
'config/initializers/action_mailer_hooks.rb',
'db/structure.sql',
'db/migrate/20221014034338_populate_releases_access_level_from_repository.rb',
'db/post_migrate/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table.rb',
'app/views/admin/dashboard/index.html.haml',
'ee/app/views/subscriptions/new.html.haml',
'spec/models/issue_spec.rb',
'ee/spec/models/ee/user_spec.rb',
'ee/spec/services/ee/notification_service_spec.rb',
'spec/factories/users.rb',
'ee/spec/factories/users.rb',
'data/whats_new/202101140001_13_08.yml',
'doc/index.md',
'app/workers/new_worker.rb',
'ee/app/workers/new_worker.rb',
'lib/gitlab/usage_data_counters/known_events/common.yml',
'app/mailers/previews/foo.rb',
'ee/app/mailers/previews/foo.rb',
'ee/app/mailers/previews/license_mailer_preview.rb',
'glfm_specification/foo',
'ee/config/metrics/counts_all/20221114065035_delete_merge_request.yml',
'ee/lib/ee/gitlab/usage_data_counters/known_events/common.yml',
'config/feature_categories.yml',
'vendor/project_templates/gitbook.tar.gz',

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports

Loading