inferno_core 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/inferno/apps/web/serializers/test.rb +1 -0
- data/lib/inferno/apps/web/serializers/test_group.rb +1 -0
- data/lib/inferno/apps/web/templates/test_kit.html.erb +10 -6
- data/lib/inferno/dsl/resume_test_route.rb +12 -4
- data/lib/inferno/dsl/runnable.rb +25 -4
- data/lib/inferno/dsl/suite_endpoint.rb +19 -6
- data/lib/inferno/entities/test_kit.rb +2 -1
- data/lib/inferno/public/bundle.js +34 -34
- data/lib/inferno/repositories/results.rb +14 -9
- data/lib/inferno/version.rb +1 -1
- data/spec/shared/test_kit_examples.rb +2 -2
- metadata +2 -2
|
@@ -15,21 +15,26 @@ module Inferno
|
|
|
15
15
|
messages = params.delete(:messages) || []
|
|
16
16
|
requests = params.delete(:requests) || []
|
|
17
17
|
super(params).tap do |result|
|
|
18
|
-
result_model = self.class::Model.find(id: result.id)
|
|
19
18
|
messages.each { |message| messages_repo.create(message.merge(result_id: result.id)) }
|
|
20
19
|
requests.each do |request|
|
|
21
|
-
request_id =
|
|
22
|
-
|
|
23
|
-
request.id
|
|
24
|
-
else
|
|
25
|
-
requests_repo.create(request.to_hash.merge(result_id: result.id)).id
|
|
26
|
-
end
|
|
27
|
-
request_model = requests_repo.class::Model.find(id: request_id)
|
|
28
|
-
result_model.add_request(request_model)
|
|
20
|
+
request_id = request.id.presence || requests_repo.create(request.to_hash.merge(result_id: result.id)).id
|
|
21
|
+
add_request(result.id, request_id)
|
|
29
22
|
end
|
|
30
23
|
end
|
|
31
24
|
end
|
|
32
25
|
|
|
26
|
+
# Associate an already persisted request with a result so that it is
|
|
27
|
+
# displayed with that result, e.g., an incoming request received while a
|
|
28
|
+
# test is waiting.
|
|
29
|
+
# @private
|
|
30
|
+
def add_request(result_id, request_id)
|
|
31
|
+
result_model = self.class::Model.find(id: result_id)
|
|
32
|
+
request_model = requests_repo.class::Model.find(id: request_id)
|
|
33
|
+
return if result_model.nil? || request_model.nil?
|
|
34
|
+
|
|
35
|
+
result_model.add_request(request_model)
|
|
36
|
+
end
|
|
37
|
+
|
|
33
38
|
# Get the current result for a particular test/group
|
|
34
39
|
# @private
|
|
35
40
|
# @example
|
data/lib/inferno/version.rb
CHANGED
|
@@ -60,8 +60,8 @@ RSpec.shared_examples 'platform_deployable_test_kit' do
|
|
|
60
60
|
expect(test_kit.description).to include('<!-- break -->'), error_message
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
it 'has a maturity of "Low", "Medium", or "
|
|
64
|
-
expect(['Low', 'Medium', 'High']).to include(test_kit.maturity) # rubocop:disable RSpec/ExpectActual
|
|
63
|
+
it 'has a maturity of "Low", "Medium", "High", or "Certification"' do
|
|
64
|
+
expect(['Low', 'Medium', 'High', 'Certification']).to include(test_kit.maturity) # rubocop:disable RSpec/ExpectActual
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
it 'uses the correct ruby version in its Dockerfile' do
|
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: 1.
|
|
4
|
+
version: 1.6.0
|
|
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: 2026-10-
|
|
13
|
+
date: 2026-10-27 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activesupport
|