inferno_core 0.3.7 → 0.3.8

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: 669dde4b0ad34993f363e538ed2d7eae59d4211f0b988a7e6306231fd54d74c0
4
+ data.tar.gz: 5149b96b6931d27a41cd0c3b0a5665024b297c6d8e612e574582cb630ef29867
5
5
  SHA512:
6
- metadata.gz: 271a59774aa21e093feace017269194676539e0685d87805fdca2c409d1de568cbd99147c16e9484ce416ac32fe1db2c22d323178db5729b52e11e616dbf07db
7
- data.tar.gz: eca623df2965155c9b4867c426e75fba81758214495160afd8236ada7e6930fda72cab708561673c2daffd45045fb3fa8994e7d2b7194272eb543f9664cf6018
6
+ metadata.gz: d5a839c224c59795ab5f79fdd18de124ba6eae8d2cdf60c1afeae4f7bf091ac1a0321ff97e7939753de1d05441df1152929e3d3ba2e743d9777ea39fc0603806
7
+ data.tar.gz: 602ac59a4417b6751d3e661d15ac55f4d7ac2f2ee171b9ac284637b3d4693f36ae85f09fbd63011fa570609dd1c8f54c7ee5c35fa28f1c909185bec2b28f0234
@@ -59,7 +59,7 @@ module Inferno
59
59
 
60
60
  test_run = repo.create(create_params(params).merge(status: 'queued'))
61
61
 
62
- self.body = serialize(test_run)
62
+ self.body = serialize(test_run, suite_options: test_session.suite_options)
63
63
 
64
64
  persist_inputs(params, test_run)
65
65
 
@@ -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,13 @@ 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
+
15
+ field :test_count do |suite, options|
16
+ suite.test_count(options[:suite_options])
17
+ end
18
+
15
19
  association :suite_options, blueprint: SuiteOption
16
20
  association :presets, view: :summary, blueprint: Preset
17
21
  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