Class: Ci::BuildReportResult

Inherits:
ApplicationRecord show all
Extended by:
Gitlab::Ci::Model
Defined in:
app/models/ci/build_report_result.rb

Instance Method Summary collapse

Methods included from Gitlab::Ci::Model

model_name, table_name_prefix

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order

Instance Method Details

#tests_durationObject


21
22
23
# File 'app/models/ci/build_report_result.rb', line 21

def tests_duration
  tests.dig("duration")
end

#tests_erroredObject


33
34
35
# File 'app/models/ci/build_report_result.rb', line 33

def tests_errored
  tests.dig("errored").to_i
end

#tests_failedObject


29
30
31
# File 'app/models/ci/build_report_result.rb', line 29

def tests_failed
  tests.dig("failed").to_i
end

#tests_nameObject


17
18
19
# File 'app/models/ci/build_report_result.rb', line 17

def tests_name
  tests.dig("name")
end

#tests_skippedObject


37
38
39
# File 'app/models/ci/build_report_result.rb', line 37

def tests_skipped
  tests.dig("skipped").to_i
end

#tests_successObject


25
26
27
# File 'app/models/ci/build_report_result.rb', line 25

def tests_success
  tests.dig("success").to_i
end

#tests_totalObject


41
42
43
# File 'app/models/ci/build_report_result.rb', line 41

def tests_total
  [tests_success, tests_failed, tests_errored, tests_skipped].sum
end