inferno_core 0.4.26 → 0.4.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inferno/apps/cli/main.rb +9 -0
- data/lib/inferno/apps/cli/new.rb +103 -0
- data/lib/inferno/apps/web/controllers/test_runs/destroy.rb +1 -1
- data/lib/inferno/apps/web/controllers/test_sessions/create.rb +3 -1
- data/lib/inferno/dsl/fhir_resource_validation.rb +1 -1
- data/lib/inferno/dsl/fhir_validation.rb +1 -1
- data/lib/inferno/dsl/resume_test_route.rb +6 -1
- data/lib/inferno/dsl/runnable.rb +4 -1
- data/lib/inferno/public/bundle.js +62 -12
- data/lib/inferno/repositories/requests.rb +2 -2
- data/lib/inferno/repositories/results.rb +2 -6
- data/lib/inferno/repositories/test_runs.rb +1 -1
- data/lib/inferno/result_summarizer.rb +4 -0
- data/lib/inferno/test_runner.rb +9 -0
- data/lib/inferno/utils/middleware/request_logger.rb +8 -1
- data/lib/inferno/utils/named_thor_actions.rb +33 -0
- data/lib/inferno/version.rb +1 -1
- metadata +18 -2
@@ -139,7 +139,7 @@ module Inferno
|
|
139
139
|
select uncounted_requests.request_id request_id
|
140
140
|
from (
|
141
141
|
select r.id request_id, t.id tag_id from requests r
|
142
|
-
inner join requests_tags rt on r
|
142
|
+
inner join requests_tags rt on r."index" = rt.requests_id
|
143
143
|
inner join tags t on rt.tags_id = t.id
|
144
144
|
where r.test_session_id = :test_session_id
|
145
145
|
and r.result_id in (
|
@@ -163,7 +163,7 @@ module Inferno
|
|
163
163
|
) as matched_requests
|
164
164
|
inner join requests final_requests on final_requests.id = matched_requests.request_id
|
165
165
|
where final_requests.test_session_id = :test_session_id
|
166
|
-
order by final_requests
|
166
|
+
order by final_requests."index"
|
167
167
|
SQL
|
168
168
|
end
|
169
169
|
|
@@ -136,12 +136,8 @@ module Inferno
|
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
|
-
def
|
140
|
-
update(result_id, result
|
141
|
-
end
|
142
|
-
|
143
|
-
def cancel_waiting_result(result_id, message = nil)
|
144
|
-
update(result_id, result: 'cancel', result_message: message)
|
139
|
+
def update_result(result_id, result, result_message = nil)
|
140
|
+
update(result_id, result:, result_message:)
|
145
141
|
end
|
146
142
|
|
147
143
|
def json_serializer_options
|
@@ -11,6 +11,10 @@ module Inferno
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def summarize
|
14
|
+
return 'pass' if all_optional_results? &&
|
15
|
+
unique_result_strings.any?('pass') &&
|
16
|
+
unique_result_strings.none? { |result| %w[wait running].include? result }
|
17
|
+
|
14
18
|
prioritized_result_strings.find { |result_string| unique_result_strings.include? result_string }
|
15
19
|
end
|
16
20
|
|
data/lib/inferno/test_runner.rb
CHANGED
@@ -123,6 +123,15 @@ module Inferno
|
|
123
123
|
}
|
124
124
|
end
|
125
125
|
|
126
|
+
if group.children.empty?
|
127
|
+
group_result = persist_result(group.reference_hash.merge(result: 'omit',
|
128
|
+
result_message: 'No tests defined',
|
129
|
+
input_json: JSON.generate(group_inputs_with_values),
|
130
|
+
output_json: '[]'))
|
131
|
+
update_parent_result(group.parent)
|
132
|
+
return group_result
|
133
|
+
end
|
134
|
+
|
126
135
|
results = []
|
127
136
|
group.children(test_session.suite_options).each do |child|
|
128
137
|
result = run(child, scratch)
|
@@ -55,7 +55,14 @@ module Inferno
|
|
55
55
|
path = env['REQUEST_URI']
|
56
56
|
query = env['rack.request.query_string']
|
57
57
|
body = env['rack.input']
|
58
|
-
body =
|
58
|
+
body =
|
59
|
+
if body.instance_of? Puma::NullIO
|
60
|
+
nil
|
61
|
+
else
|
62
|
+
contents = body.read
|
63
|
+
body.rewind
|
64
|
+
contents
|
65
|
+
end
|
59
66
|
query_string = query.blank? ? '' : "?#{query}"
|
60
67
|
|
61
68
|
logger.info("#{method} #{scheme}://#{host}#{path}#{query_string}")
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'dry/inflector'
|
2
|
+
|
3
|
+
module Inferno
|
4
|
+
module Utils
|
5
|
+
module NamedThorActions
|
6
|
+
INFLECTOR = Dry::Inflector.new
|
7
|
+
|
8
|
+
def root_name
|
9
|
+
INFLECTOR.dasherize(INFLECTOR.underscore(name))
|
10
|
+
end
|
11
|
+
|
12
|
+
def library_name
|
13
|
+
INFLECTOR.underscore(name)
|
14
|
+
end
|
15
|
+
|
16
|
+
def module_name
|
17
|
+
INFLECTOR.camelize(name)
|
18
|
+
end
|
19
|
+
|
20
|
+
def human_name
|
21
|
+
INFLECTOR.humanize(INFLECTOR.underscore(name))
|
22
|
+
end
|
23
|
+
|
24
|
+
def title_name
|
25
|
+
human_name.split.map(&:capitalize).join(' ')
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_suite_id
|
29
|
+
"#{library_name}_test_suite"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/inferno/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inferno_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen MacVicar
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-02-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -110,6 +110,20 @@ dependencies:
|
|
110
110
|
- - '='
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: 0.8.1
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: dry-inflector
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - '='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0.3'
|
120
|
+
type: :runtime
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - '='
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0.3'
|
113
127
|
- !ruby/object:Gem::Dependency
|
114
128
|
name: dry-system
|
115
129
|
requirement: !ruby/object:Gem::Requirement
|
@@ -532,6 +546,7 @@ files:
|
|
532
546
|
- lib/inferno/apps/cli/console.rb
|
533
547
|
- lib/inferno/apps/cli/main.rb
|
534
548
|
- lib/inferno/apps/cli/migration.rb
|
549
|
+
- lib/inferno/apps/cli/new.rb
|
535
550
|
- lib/inferno/apps/cli/services.rb
|
536
551
|
- lib/inferno/apps/cli/suite.rb
|
537
552
|
- lib/inferno/apps/cli/suite_input_template.rb
|
@@ -659,6 +674,7 @@ files:
|
|
659
674
|
- lib/inferno/utils/markdown_formatter.rb
|
660
675
|
- lib/inferno/utils/middleware/request_logger.rb
|
661
676
|
- lib/inferno/utils/migration.rb
|
677
|
+
- lib/inferno/utils/named_thor_actions.rb
|
662
678
|
- lib/inferno/utils/preset_processor.rb
|
663
679
|
- lib/inferno/utils/preset_template_generator.rb
|
664
680
|
- lib/inferno/utils/static_assets.rb
|