inferno_core 0.3.7 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20fc2d3e3d1a42d30682916011622f3827b809089883dc591f799bfbf334b1f8
4
- data.tar.gz: f606bb9364a4e08b29754706692fc1e525e3592c2c01490183574673201ee1be
3
+ metadata.gz: 3001d2c9b156117f88ae751c8e2f81416c9b37249d8a0bdce7de759a52bde543
4
+ data.tar.gz: b2dc6e6d2168c11eee09326d19459fbd202c92cddc871925de5283250cdb7dde
5
5
  SHA512:
6
- metadata.gz: 271a59774aa21e093feace017269194676539e0685d87805fdca2c409d1de568cbd99147c16e9484ce416ac32fe1db2c22d323178db5729b52e11e616dbf07db
7
- data.tar.gz: eca623df2965155c9b4867c426e75fba81758214495160afd8236ada7e6930fda72cab708561673c2daffd45045fb3fa8994e7d2b7194272eb543f9664cf6018
6
+ metadata.gz: e16fda0221af1b289a1fb2cd82fa011723cef4c0e6cb443c3ec730cb527e2cfb1be11f4a5ff87093709dadb01ad0bd2551bfb0e5fa1a7b2c826a93e1e4e8c7af
7
+ data.tar.gz: 78a0c14897fd20e3273cd0a4f45a5c84c9d4f5ddc79beb9afca7e9a0a938f5144729e6e2e3c5588d127bcd87dfb5ca291e807a8e7688089dc99b4f3d13cc7742
@@ -19,9 +19,10 @@ module Inferno
19
19
  end
20
20
 
21
21
  def persist_inputs(params, test_run)
22
+ available_inputs = test_run.runnable.available_inputs
22
23
  params[:inputs]&.each do |input_params|
23
24
  input =
24
- test_run.runnable.available_inputs
25
+ available_inputs
25
26
  .find { |_, runnable_input| runnable_input.name == input_params[:name] }
26
27
  &.last
27
28
 
@@ -59,7 +60,7 @@ module Inferno
59
60
 
60
61
  test_run = repo.create(create_params(params).merge(status: 'queued'))
61
62
 
62
- self.body = serialize(test_run)
63
+ self.body = serialize(test_run, suite_options: test_session.suite_options)
63
64
 
64
65
  persist_inputs(params, test_run)
65
66
 
@@ -3,6 +3,8 @@ module Inferno
3
3
  module Controllers
4
4
  module TestRuns
5
5
  class Show < Controller
6
+ include Import[test_sessions_repo: 'repositories.test_sessions']
7
+
6
8
  def call(params)
7
9
  test_run = repo.find(params[:id])
8
10
  halt 404 if test_run.nil?
@@ -17,7 +19,8 @@ module Inferno
17
19
  end
18
20
  end
19
21
 
20
- self.body = serialize(test_run)
22
+ test_session = test_sessions_repo.find(test_run.test_session_id)
23
+ self.body = serialize(test_run, suite_options: test_session.suite_options)
21
24
  end
22
25
  end
23
26
  end
@@ -10,11 +10,13 @@ module Inferno
10
10
  field :description
11
11
  field :short_description
12
12
  field :input_instructions
13
- field :test_count
14
13
  field :run_as_group?, name: :run_as_group
15
14
  field :user_runnable?, name: :user_runnable
16
15
  field :optional?, name: :optional
17
16
 
17
+ field :test_count do |group, options|
18
+ group.test_count(options[:suite_options])
19
+ end
18
20
  field :test_groups do |group, options|
19
21
  suite_options = options[:suite_options]
20
22
  TestGroup.render_as_hash(group.groups(suite_options), suite_options: suite_options)
@@ -6,7 +6,9 @@ module Inferno
6
6
  field :test_session_id
7
7
 
8
8
  field :status
9
- field :test_count
9
+ field :test_count do |test_run, options|
10
+ test_run.test_count(options[:suite_options])
11
+ end
10
12
 
11
13
  field :test_group_id, if: :field_present?
12
14
  field :test_suite_id, if: :field_present?
@@ -9,9 +9,14 @@ module Inferno
9
9
  field :description
10
10
  field :short_description
11
11
  field :input_instructions
12
- field :test_count
13
12
  field :version
14
13
  field :links
14
+ field :suite_summary
15
+
16
+ field :test_count do |suite, options|
17
+ suite.test_count(options[:suite_options])
18
+ end
19
+
15
20
  association :suite_options, blueprint: SuiteOption
16
21
  association :presets, view: :summary, blueprint: Preset
17
22
  end
@@ -68,8 +68,8 @@ module Inferno
68
68
  super.merge(test_session: test_session).compact
69
69
  end
70
70
 
71
- def test_count
72
- @test_count ||= runnable.test_count
71
+ def test_count(selected_suite_options = [])
72
+ @test_count ||= runnable.test_count(selected_suite_options)
73
73
  end
74
74
  end
75
75
  end
@@ -99,6 +99,12 @@ module Inferno
99
99
 
100
100
  @links = links
101
101
  end
102
+
103
+ def suite_summary(suite_summary = nil)
104
+ return @suite_summary if suite_summary.nil?
105
+
106
+ @suite_summary = format_markdown(suite_summary)
107
+ end
102
108
  end
103
109
  end
104
110
  end