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-mapping32
1 files changed, 27 insertions, 5 deletions
diff --git a/scripts/verify-tff-mapping b/scripts/verify-tff-mapping
index 86ab7548b19..0bf4db52698 100755
--- a/scripts/verify-tff-mapping
+++ b/scripts/verify-tff-mapping
@@ -43,8 +43,13 @@ tests = [
{
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']
+ source: 'lib/gitlab/usage_data_counters/wiki_page_counter.rb',
+ expected: ['spec/lib/gitlab/usage_data_spec.rb', 'spec/lib/gitlab/usage_data_counters/wiki_page_counter_spec.rb']
+ },
+ {
+ explanation: 'EE usage counters map to usage data spec',
+ source: 'ee/lib/gitlab/usage_data_counters/licenses_list.rb',
+ expected: ['ee/spec/lib/gitlab/usage_data_counters/licenses_list_spec.rb', 'spec/lib/gitlab/usage_data_spec.rb']
},
{
@@ -85,8 +90,8 @@ tests = [
{
explanation: 'Migration should map to its non-timestamped spec',
- source: 'db/migrate/20221014034338_populate_releases_access_level_from_repository.rb',
- expected: ['spec/migrations/populate_releases_access_level_from_repository_spec.rb']
+ source: 'db/migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb',
+ expected: ['spec/migrations/sync_new_amount_used_for_ci_project_monthly_usages_spec.rb']
},
# rubocop:disable Layout/LineLength
{
@@ -220,6 +225,17 @@ tests = [
explanation: 'https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/1683#note_1385966977',
source: 'app/finders/members_finder.rb',
expected: ['spec/finders/members_finder_spec.rb', 'spec/graphql/types/project_member_relation_enum_spec.rb']
+ },
+
+ {
+ explanation: 'Map FOSS rake tasks',
+ source: 'lib/tasks/import.rake',
+ expected: ['spec/tasks/import_rake_spec.rb']
+ },
+ {
+ explanation: 'Map EE rake tasks',
+ source: 'ee/lib/tasks/geo.rake',
+ expected: ['ee/spec/tasks/geo_rake_spec.rb']
}
]
@@ -241,7 +257,12 @@ class MappingTest
end
def failure_message
- "#{explanation}: #{source}: Expected #{expected_set.to_a}, got #{actual_set.to_a}."
+ <<~MESSAGE
+ #{explanation}:
+ Source #{source}
+ Expected #{expected_set.to_a}
+ Actual #{actual_set.to_a}
+ MESSAGE
end
private
@@ -262,6 +283,7 @@ failed_tests = results.select(&:failed?)
if failed_tests.any?
puts <<~MESSAGE
tff mapping verification failed:
+
#{failed_tests.map(&:failure_message).join("\n")}
MESSAGE