Module: GitlabQuality::TestTooling::Concerns::FindSetDri

Included in:
Report::RelateFailureIssue, TestMeta::TestMetaUpdater
Defined in:
lib/gitlab_quality/test_tooling/concerns/find_set_dri.rb

Instance Method Summary collapse

Instance Method Details

#test_dri(product_group, stage, section) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/gitlab_quality/test_tooling/concerns/find_set_dri.rb', line 9

def test_dri(product_group, stage, section)
  parse_json_with_sets
  fetch_section_sets(section)
  fetch_stage_sets(stage)
  fetch_group_sets(product_group)

  set_dris = if @group_sets.any?
               @group_sets
             elsif @stage_sets.any?
               @stage_sets
             elsif @section_sets.any?
               @section_sets
             else
               @sets
             end

  set_dris.sample['username']
end