inferno_core 0.3.6 → 0.3.9

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: 2f0cad7d368810c89ee2571e1f8aa6705d6b74b1ad058b8f179269a7705c2df7
4
- data.tar.gz: 7f1ab19849ca3454f536b06963df78abc91c5dc7cbde24e796338836cd081e10
3
+ metadata.gz: 9b1fdfa108a1efc7ef07ca853de7b877d4f7f3062881c8461c7db5e7ed4cecf0
4
+ data.tar.gz: 848ee45d91553dcaa56fd4240037b4b9e642557238c0ca9c8b6ce90f082fe589
5
5
  SHA512:
6
- metadata.gz: b7ff909be62d859f3a0755f787fb8d893edaadffd16cc70dd18f47cfe0184b2ec82330a7f51a02617c4b8afb6710e3282492a9a2f23cf82e37650548cbd9dd4b
7
- data.tar.gz: 5832f7eb12e90626ebd9ca84e945a3afc631e5d63d024381548ed7c3fc373ff85ca9ea34533a79eefedb7e8ab8d80d65229d2fffd180c7d289586528b29dfb03
6
+ metadata.gz: 33eafbcddeb83e41b324e50570584e07b321cb44ac1f90621bd562d2f2d023902b3705b1495753aba2cc89dab675d93a33a9bab359ce8aefcd9ebe54582b3b81
7
+ data.tar.gz: 999fa58453aaf2b95d2fd19dc720e97ef77b858fcf1e2e2b70ca1657d7c9eb71bc056938c31b83f8232b515048c93b56af10b9beae4e1a23a833531381b16e4a
@@ -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,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