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:
Diffstat (limited to 'scripts/verify-tff-mapping')
-rwxr-xr-xscripts/verify-tff-mapping114
1 files changed, 87 insertions, 27 deletions
diff --git a/scripts/verify-tff-mapping b/scripts/verify-tff-mapping
index b4974f71ebf..302e50bf34f 100755
--- a/scripts/verify-tff-mapping
+++ b/scripts/verify-tff-mapping
@@ -35,6 +35,30 @@ tests = [
},
{
+ explanation: 'EE lib should map to respective spec.',
+ source: 'ee/lib/world.rb',
+ expected: ['ee/spec/lib/world_spec.rb']
+ },
+
+ {
+ explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/368628',
+ source: 'lib/gitlab/usage_data_counters/foo.rb',
+ expected: ['spec/lib/gitlab/usage_data_spec.rb']
+ },
+
+ {
+ explanation: 'https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/54#note_1160811638',
+ source: 'lib/gitlab/ci/config/base.rb',
+ expected: ['spec/lib/gitlab/ci/yaml_processor_spec.rb']
+ },
+
+ {
+ explanation: 'https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/54#note_1160811638',
+ source: 'ee/lib/gitlab/ci/config/base.rb',
+ expected: ['spec/lib/gitlab/ci/yaml_processor_spec.rb', 'ee/spec/lib/gitlab/ci/yaml_processor_spec.rb']
+ },
+
+ {
explanation: 'FOSS lib should map to respective spec',
source: 'lib/gitaly/server.rb',
expected: ['spec/lib/gitaly/server_spec.rb']
@@ -47,6 +71,42 @@ tests = [
},
{
+ explanation: 'Initializers should map to respective spec',
+ source: 'config/initializers/action_mailer_hooks.rb',
+ expected: ['spec/initializers/action_mailer_hooks_spec.rb']
+ },
+
+ {
+ explanation: 'DB structure should map to schema spec',
+ source: 'db/structure.sql',
+ expected: ['spec/db/schema_spec.rb']
+ },
+
+ {
+ explanation: 'Migration should map to its non-timestamped spec',
+ source: 'db/migrate/20210818220234_add_default_project_approval_rules_vuln_allowed.rb',
+ expected: ['spec/migrations/add_default_project_approval_rules_vuln_allowed_spec.rb']
+ },
+
+ {
+ explanation: 'Migration should map to its timestamped spec',
+ source: 'db/post_migrate/20210915022415_cleanup_bigint_conversion_for_ci_builds.rb',
+ expected: ['spec/migrations/20210915022415_cleanup_bigint_conversion_for_ci_builds_spec.rb']
+ },
+
+ {
+ explanation: 'FOSS views should map to respective spec',
+ source: 'app/views/admin/dashboard/index.html.haml',
+ expected: ['spec/views/admin/dashboard/index.html.haml_spec.rb']
+ },
+
+ {
+ explanation: 'EE views should map to respective spec',
+ source: 'ee/app/views/subscriptions/new.html.haml',
+ expected: ['ee/spec/views/subscriptions/new.html.haml_spec.rb']
+ },
+
+ {
explanation: 'FOSS spec code should map to itself',
source: 'spec/models/issue_spec.rb',
expected: ['spec/models/issue_spec.rb']
@@ -77,57 +137,57 @@ tests = [
},
{
- explanation: 'Initializers should map to respective spec',
- source: 'config/initializers/action_mailer_hooks.rb',
- expected: ['spec/initializers/action_mailer_hooks_spec.rb']
+ explanation: 'Whats New should map to its respective spec',
+ source: 'data/whats_new/202101140001_13_08.yml',
+ expected: ['spec/lib/release_highlights/validator_spec.rb']
},
{
- explanation: 'FOSS views should map to respective spec',
- source: 'app/views/admin/dashboard/index.html.haml',
- expected: ['spec/views/admin/dashboard/index.html.haml_spec.rb']
+ explanation: 'The documentation index page is used in this haml_lint spec',
+ source: 'doc/index.md',
+ expected: ['spec/haml_lint/linter/documentation_links_spec.rb']
},
{
- explanation: 'EE views should map to respective spec',
- source: 'ee/app/views/subscriptions/new.html.haml',
- expected: ['ee/spec/views/subscriptions/new.html.haml_spec.rb']
+ explanation: 'Spec for FOSS sidekiq worker',
+ source: 'app/workers/new_worker.rb',
+ expected: ['spec/workers/every_sidekiq_worker_spec.rb']
},
{
- explanation: 'DB structure should map to schema spec',
- source: 'db/structure.sql',
- expected: ['spec/db/schema_spec.rb']
+ explanation: 'Spec for EE sidekiq worker',
+ source: 'ee/app/workers/new_worker.rb',
+ expected: ['spec/workers/every_sidekiq_worker_spec.rb']
},
{
- explanation: 'Migration should map to its non-timestamped spec',
- source: 'db/migrate/20210818220234_add_default_project_approval_rules_vuln_allowed.rb',
- expected: ['spec/migrations/add_default_project_approval_rules_vuln_allowed_spec.rb']
+ explanation: 'Known events',
+ source: 'lib/gitlab/usage_data_counters/known_events/common.yml',
+ expected: ['spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb', 'spec/lib/gitlab/usage_data_spec.rb']
},
{
- explanation: 'Migration should map to its timestamped spec',
- source: 'db/post_migrate/20210915022415_cleanup_bigint_conversion_for_ci_builds.rb',
- expected: ['spec/migrations/20210915022415_cleanup_bigint_conversion_for_ci_builds_spec.rb']
+ explanation: 'FOSS mailer previews',
+ source: 'app/mailers/previews/foo.rb',
+ expected: ['spec/mailers/previews_spec.rb']
},
{
- explanation: 'Whats New should map to its respective spec',
- source: 'data/whats_new/202101140001_13_08.yml',
- expected: ['spec/lib/release_highlights/validator_spec.rb']
+ explanation: 'EE mailer previews',
+ source: 'ee/app/mailers/previews/foo.rb',
+ expected: ['spec/mailers/previews_spec.rb']
},
{
- explanation: 'Spec for every sidekiq worker',
- source: 'app/workers/new_worker.rb',
- expected: ['spec/workers/every_sidekiq_worker_spec.rb']
+ explanation: 'EE mailer extension previews',
+ source: 'ee/app/mailers/previews/license_mailer_preview.rb',
+ expected: ['spec/mailers/previews_spec.rb']
},
{
- explanation: 'Known events',
- source: 'lib/gitlab/usage_data_counters/known_events/common.yml',
- expected: ['spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb', 'spec/lib/gitlab/usage_data_spec.rb']
+ explanation: 'GLFM spec and config files for CE and EE should map to respective markdown snapshot specs',
+ source: 'glfm_specification/foo',
+ expected: ['spec/requests/api/markdown_snapshot_spec.rb', 'ee/spec/requests/api/markdown_snapshot_spec.rb']
}
]