Class: Ci::BuildReportResult

Inherits:
ApplicationRecord show all
Defined in:
app/models/ci/build_report_result.rb

Constant Summary

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Method Summary collapse

Methods inherited from ApplicationRecord

model_name, table_name_prefix

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#suite_errorObject


39
40
41
# File 'app/models/ci/build_report_result.rb', line 39

def suite_error
  tests.dig("suite_error")
end

#tests_durationObject


19
20
21
# File 'app/models/ci/build_report_result.rb', line 19

def tests_duration
  tests.dig("duration")
end

#tests_erroredObject


31
32
33
# File 'app/models/ci/build_report_result.rb', line 31

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

#tests_failedObject


27
28
29
# File 'app/models/ci/build_report_result.rb', line 27

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

#tests_nameObject


15
16
17
# File 'app/models/ci/build_report_result.rb', line 15

def tests_name
  tests.dig("name")
end

#tests_skippedObject


35
36
37
# File 'app/models/ci/build_report_result.rb', line 35

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

#tests_successObject


23
24
25
# File 'app/models/ci/build_report_result.rb', line 23

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

#tests_totalObject


43
44
45
# File 'app/models/ci/build_report_result.rb', line 43

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