diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 21:17:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 21:17:34 +0300 |
commit | 0aa20f3dac8e19cc10b62e08a5c84df105a648c2 (patch) | |
tree | 3347e2aa05c399d70f82775fa58ffd4b531ba282 /tooling | |
parent | 67daaf4021a180166ad063e3a75ea777e96586a6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'tooling')
-rw-r--r-- | tooling/lib/tooling/test_map_generator.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tooling/lib/tooling/test_map_generator.rb b/tooling/lib/tooling/test_map_generator.rb index 20e4ed8e405..f96f33ff074 100644 --- a/tooling/lib/tooling/test_map_generator.rb +++ b/tooling/lib/tooling/test_map_generator.rb @@ -12,7 +12,12 @@ module Tooling def parse(yaml_files) Array(yaml_files).each do |yaml_file| data = File.read(yaml_file) - _metadata, example_groups = data.split("---\n").reject(&:empty?).map { |yml| YAML.safe_load(yml, [Symbol]) } + metadata, example_groups = data.split("---\n").reject(&:empty?).map { |yml| YAML.safe_load(yml, [Symbol]) } + + if example_groups.nil? + puts "No examples in #{yaml_file}! Metadata: #{metadata}" + next + end example_groups.each do |example_id, files| files.each do |file| |