rsmp-validator 0.1.1 → 0.3.3
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/config/cross_rs4s.yaml +6 -0
- data/config/gem_supervisor.yaml +6 -0
- data/config/gem_tlc.yaml +6 -0
- data/config/kapsch_etx.yaml +13 -6
- data/config/lightmotion_satellite.yaml +8 -2
- data/config/semaforica_cartesio.yaml +8 -2
- data/config/sus.rb +1 -1
- data/config/swarco_itc3.yaml +8 -2
- data/config/tecsen_tmacs_supervisor.yaml +6 -0
- data/exe/rsmp-validator +2 -117
- data/lib/rsmp/validator/async_context.rb +4 -3
- data/lib/rsmp/validator/auto_node.rb +5 -15
- data/lib/rsmp/validator/cli/config_cli.rb +32 -0
- data/lib/rsmp/validator/cli/entrypoint.rb +40 -0
- data/lib/rsmp/validator/cli/run_options.rb +87 -0
- data/lib/rsmp/validator/cli/runner.rb +119 -0
- data/lib/rsmp/validator/cli/tee_io.rb +30 -0
- data/lib/rsmp/validator/cli/validator_overrides.rb +28 -0
- data/lib/rsmp/validator/compliance/config_metadata.rb +31 -0
- data/lib/rsmp/validator/compliance/config_sxls.rb +24 -0
- data/lib/rsmp/validator/compliance/report.rb +70 -0
- data/lib/rsmp/validator/compliance/report_failure.rb +45 -0
- data/lib/rsmp/validator/compliance/report_metadata.rb +101 -0
- data/lib/rsmp/validator/config_check.rb +72 -0
- data/lib/rsmp/validator/configuration/loader.rb +6 -0
- data/lib/rsmp/validator/configuration/sxls_override.rb +33 -0
- data/lib/rsmp/validator/configuration/validation.rb +1 -35
- data/lib/rsmp/validator/configuration/version_normalization.rb +56 -0
- data/lib/rsmp/validator/configuration.rb +25 -22
- data/lib/rsmp/validator/helpers/alarms.rb +1 -1
- data/lib/rsmp/validator/helpers/clock.rb +2 -2
- data/lib/rsmp/validator/helpers/connection.rb +18 -8
- data/lib/rsmp/validator/helpers/handshake.rb +5 -8
- data/lib/rsmp/validator/helpers/input.rb +3 -3
- data/lib/rsmp/validator/helpers/security.rb +1 -1
- data/lib/rsmp/validator/helpers/signal_plans.rb +5 -5
- data/lib/rsmp/validator/helpers/signal_priority.rb +8 -11
- data/lib/rsmp/validator/helpers/startup.rb +6 -20
- data/lib/rsmp/validator/helpers/status.rb +1 -1
- data/lib/rsmp/validator/lifecycle.rb +11 -4
- data/lib/rsmp/validator/options/site_test_options.rb +21 -1
- data/lib/rsmp/validator/options/supervisor_test_options.rb +50 -13
- data/lib/rsmp/validator/site_tester.rb +15 -6
- data/lib/rsmp/validator/supervisor_tester.rb +11 -5
- data/lib/rsmp/validator/tester.rb +25 -29
- data/lib/rsmp/validator/version.rb +1 -1
- data/lib/rsmp/validator/version_filter.rb +1 -1
- data/lib/rsmp/validator.rb +5 -1
- data/schemas/site_test.json +0 -6
- data/test/site/core/aggregated_status_spec.rb +5 -7
- data/test/site/core/connect_spec.rb +5 -5
- data/test/site/core/disconnect_spec.rb +10 -19
- data/test/site/core/message_buffer_spec.rb +114 -0
- data/test/site/tlc/alarm_spec.rb +7 -7
- data/test/site/tlc/clock_spec.rb +26 -26
- data/test/site/tlc/detector_logics_spec.rb +6 -6
- data/test/site/tlc/emergency_routes_spec.rb +16 -16
- data/test/site/tlc/input_spec.rb +10 -10
- data/test/site/tlc/invalid_command_spec.rb +24 -20
- data/test/site/tlc/invalid_status_spec.rb +25 -20
- data/test/site/tlc/modes_spec.rb +53 -37
- data/test/site/tlc/output_spec.rb +8 -8
- data/test/site/tlc/signal_groups_spec.rb +8 -8
- data/test/site/tlc/signal_plans_spec.rb +32 -34
- data/test/site/tlc/signal_priority_spec.rb +10 -12
- data/test/site/tlc/subscribe_spec.rb +33 -30
- data/test/site/tlc/system_spec.rb +12 -10
- data/test/site/tlc/traffic_data_spec.rb +27 -16
- data/test/site/tlc/traffic_situations_spec.rb +5 -5
- data/test/supervisor/connect_spec.rb +9 -12
- metadata +35 -6
|
@@ -10,9 +10,7 @@ describe 'Supervisor' do
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def prepare_and_wait_for_collector(supervisor_proxy)
|
|
13
|
-
|
|
14
|
-
collector.use_task Async::Task.current
|
|
15
|
-
collector.wait!
|
|
13
|
+
supervisor_proxy.collector.wait!
|
|
16
14
|
end
|
|
17
15
|
|
|
18
16
|
def direction_and_type_pairs(messages)
|
|
@@ -23,13 +21,12 @@ describe 'Supervisor' do
|
|
|
23
21
|
timeout = RSMP::Validator.get_config('timeouts', 'ready')
|
|
24
22
|
got_messages = nil
|
|
25
23
|
with_supervisor(:isolated,
|
|
26
|
-
'
|
|
24
|
+
'core_version' => core_version,
|
|
27
25
|
'collect' => {
|
|
28
26
|
**connection_collect_options(timeout, length)
|
|
29
27
|
}) do |supervisor_proxy|
|
|
30
|
-
prepare_and_wait_for_collector(supervisor_proxy)
|
|
28
|
+
got_messages = prepare_and_wait_for_collector(supervisor_proxy)
|
|
31
29
|
assert(supervisor_proxy.ready?, 'expected site proxy to be ready')
|
|
32
|
-
got_messages = supervisor_proxy.collector.messages
|
|
33
30
|
end
|
|
34
31
|
direction_and_type_pairs(got_messages)
|
|
35
32
|
rescue Async::TimeoutError
|
|
@@ -108,7 +105,7 @@ describe 'Supervisor' do
|
|
|
108
105
|
case version
|
|
109
106
|
when '3.1.1', '3.1.2', '3.1.3'
|
|
110
107
|
check_sequence_v311 version
|
|
111
|
-
when '3.1.4', '3.1.5', '3.2', '3.2.1', '3.2.2'
|
|
108
|
+
when '3.1.4', '3.1.5', '3.2.0', '3.2.1', '3.2.2'
|
|
112
109
|
check_sequence_v314 version
|
|
113
110
|
when '3.3.0'
|
|
114
111
|
check_sequence_v330 version
|
|
@@ -172,15 +169,15 @@ describe 'Supervisor' do
|
|
|
172
169
|
check_sequence '3.1.5'
|
|
173
170
|
end
|
|
174
171
|
|
|
175
|
-
# Verify the connection sequence when using rsmp core 3.2
|
|
172
|
+
# Verify the connection sequence when using rsmp core 3.2.0
|
|
176
173
|
#
|
|
177
|
-
# 1. Given the site is connected and using core 3.2
|
|
174
|
+
# 1. Given the site is connected and using core 3.2.0
|
|
178
175
|
# 2. Send and receive handshake messages
|
|
179
176
|
# 3. Expect the handshake messages to be in the specified sequence corresponding to version 3.1.5
|
|
180
177
|
# 4. Expect the connection sequence to be complete
|
|
181
|
-
it 'exchanges correct connection sequence of rsmp version 3.2' do
|
|
182
|
-
skip 'requires core == 3.2' unless RSMP::Validator.core_matches?('3.2')
|
|
183
|
-
check_sequence '3.2'
|
|
178
|
+
it 'exchanges correct connection sequence of rsmp version 3.2.0' do
|
|
179
|
+
skip 'requires core == 3.2.0' unless RSMP::Validator.core_matches?('3.2.0')
|
|
180
|
+
check_sequence '3.2.0'
|
|
184
181
|
end
|
|
185
182
|
|
|
186
183
|
# Verify the connection sequence when using rsmp core 3.2.1
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rsmp-validator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- RSMP Nordic
|
|
@@ -9,6 +9,20 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rsmp
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 0.50.0
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 0.50.0
|
|
12
26
|
- !ruby/object:Gem::Dependency
|
|
13
27
|
name: activesupport
|
|
14
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -38,21 +52,21 @@ dependencies:
|
|
|
38
52
|
- !ruby/object:Gem::Version
|
|
39
53
|
version: '0'
|
|
40
54
|
- !ruby/object:Gem::Dependency
|
|
41
|
-
name:
|
|
55
|
+
name: sus
|
|
42
56
|
requirement: !ruby/object:Gem::Requirement
|
|
43
57
|
requirements:
|
|
44
58
|
- - ">="
|
|
45
59
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: 0
|
|
60
|
+
version: '0'
|
|
47
61
|
type: :runtime
|
|
48
62
|
prerelease: false
|
|
49
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
64
|
requirements:
|
|
51
65
|
- - ">="
|
|
52
66
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: 0
|
|
67
|
+
version: '0'
|
|
54
68
|
- !ruby/object:Gem::Dependency
|
|
55
|
-
name: sus
|
|
69
|
+
name: sus-fixtures-async
|
|
56
70
|
requirement: !ruby/object:Gem::Requirement
|
|
57
71
|
requirements:
|
|
58
72
|
- - ">="
|
|
@@ -66,7 +80,7 @@ dependencies:
|
|
|
66
80
|
- !ruby/object:Gem::Version
|
|
67
81
|
version: '0'
|
|
68
82
|
- !ruby/object:Gem::Dependency
|
|
69
|
-
name:
|
|
83
|
+
name: thor
|
|
70
84
|
requirement: !ruby/object:Gem::Requirement
|
|
71
85
|
requirements:
|
|
72
86
|
- - ">="
|
|
@@ -113,11 +127,25 @@ files:
|
|
|
113
127
|
- lib/rsmp/validator/auto_node.rb
|
|
114
128
|
- lib/rsmp/validator/auto_site.rb
|
|
115
129
|
- lib/rsmp/validator/auto_supervisor.rb
|
|
130
|
+
- lib/rsmp/validator/cli/config_cli.rb
|
|
131
|
+
- lib/rsmp/validator/cli/entrypoint.rb
|
|
132
|
+
- lib/rsmp/validator/cli/run_options.rb
|
|
133
|
+
- lib/rsmp/validator/cli/runner.rb
|
|
134
|
+
- lib/rsmp/validator/cli/tee_io.rb
|
|
135
|
+
- lib/rsmp/validator/cli/validator_overrides.rb
|
|
136
|
+
- lib/rsmp/validator/compliance/config_metadata.rb
|
|
137
|
+
- lib/rsmp/validator/compliance/config_sxls.rb
|
|
138
|
+
- lib/rsmp/validator/compliance/report.rb
|
|
139
|
+
- lib/rsmp/validator/compliance/report_failure.rb
|
|
140
|
+
- lib/rsmp/validator/compliance/report_metadata.rb
|
|
141
|
+
- lib/rsmp/validator/config_check.rb
|
|
116
142
|
- lib/rsmp/validator/config_normalizer.rb
|
|
117
143
|
- lib/rsmp/validator/configuration.rb
|
|
118
144
|
- lib/rsmp/validator/configuration/loader.rb
|
|
119
145
|
- lib/rsmp/validator/configuration/secrets.rb
|
|
146
|
+
- lib/rsmp/validator/configuration/sxls_override.rb
|
|
120
147
|
- lib/rsmp/validator/configuration/validation.rb
|
|
148
|
+
- lib/rsmp/validator/configuration/version_normalization.rb
|
|
121
149
|
- lib/rsmp/validator/helpers/alarms.rb
|
|
122
150
|
- lib/rsmp/validator/helpers/clock.rb
|
|
123
151
|
- lib/rsmp/validator/helpers/connection.rb
|
|
@@ -144,6 +172,7 @@ files:
|
|
|
144
172
|
- test/site/core/connect_spec.rb
|
|
145
173
|
- test/site/core/core_spec.rb
|
|
146
174
|
- test/site/core/disconnect_spec.rb
|
|
175
|
+
- test/site/core/message_buffer_spec.rb
|
|
147
176
|
- test/site/site_spec.rb
|
|
148
177
|
- test/site/tlc/alarm_spec.rb
|
|
149
178
|
- test/site/tlc/clock_spec.rb
|