Skip to content

Commit e342b10

Browse files
committed
add RST_EXCEPTION
1 parent a76653b commit e342b10

File tree

4 files changed

+35
-22
lines changed

4 files changed

+35
-22
lines changed

ChangeLog.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
2024-12-11:
2+
- |
3+
Added the [`RST_EXCEPTION`](#Error-RST_EXCEPTION) error, which may be
4+
emitted by any test case, and indicates that an internal exception has
5+
occurred.
26
- |
37
Updated [epp-19](#Test-Case-epp-19) to avoid the use of the EPP message
48
queue.

inc/suites.yaml.in

-3
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,6 @@ StandardRDE:
200200
- rde.depositFile
201201
- epp.hostModel
202202
- general.registryDataModel
203-
Errors:
204-
- RDE_XML_PARSE_ERROR
205-
- RDE_SCHEMA_VALIDATION_ERROR
206203

207204
StandardIDN:
208205
Order: 6

rst-test-specs.yaml.in

+10
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ Input-Parameters:
5757
#exec sed 's/^/ /' inc/integration/inputs.yaml
5858

5959
Errors:
60+
RST_EXCEPTION:
61+
Severity: CRITICAL
62+
Description: |
63+
This error occurs when an exception occurs in the RST test system that
64+
cannot be recovered. This issue is with RST system, not the target
65+
registry system. If this error occurs, then the test run will have a
66+
`result` property of `exception`.
67+
68+
This error may occur in any test case.
69+
6070
#exec sed 's/^/ /' tmp/zonemaster-errors.yaml
6171
#exec sed 's/^/ /' inc/dns/errors.yaml
6272
#exec sed 's/^/ /' inc/dnssec/errors.yaml

tools/lint.pl

+21-19
Original file line numberDiff line numberDiff line change
@@ -232,32 +232,34 @@ sub check_error {
232232
warn(sprintf("Error '%s' has unsupported severity '%s'", $error->id, $error->severity));
233233
}
234234

235-
my $used;
236-
CASE: foreach my $case ($spec->cases) {
237-
if (scalar(grep { $error->id eq $_ } @{$case->{'Errors'}}) > 0) {
238-
$used = 1;
239-
last CASE;
235+
warn(sprintf("Error '%s' appears to have a placeholder description", $error->id)) if ($error->{'Description'} =~ /^TBA/);
236+
237+
if (q{RST_EXCEPTION} ne $error->id) {
238+
my $used;
239+
CASE: foreach my $case ($spec->cases) {
240+
if (scalar(grep { $error->id eq $_ } @{$case->{'Errors'}}) > 0) {
241+
$used = 1;
242+
last CASE;
243+
}
240244
}
241-
}
242245

243-
PROVIDER: foreach my $provider ($spec->providers) {
244-
my $i = 0;
245-
COLUMN: foreach my $column ($provider->columns) {
246-
if ('errorCode' eq $column->name) {
247-
ROW: foreach my $row (@{$provider->rows}) {
248-
if ($error->id eq $row->[$i]) {
249-
$used = 1;
250-
last PROVIDER;
246+
PROVIDER: foreach my $provider ($spec->providers) {
247+
my $i = 0;
248+
COLUMN: foreach my $column ($provider->columns) {
249+
if ('errorCode' eq $column->name) {
250+
ROW: foreach my $row (@{$provider->rows}) {
251+
if ($error->id eq $row->[$i]) {
252+
$used = 1;
253+
last PROVIDER;
254+
}
251255
}
252256
}
257+
$i++;
253258
}
254-
$i++;
255259
}
256-
}
257260

258-
warn(sprintf("Error '%s' appears to have a placeholder description", $error->id)) if ($error->{'Description'} =~ /^TBA/);
259-
260-
warn(sprintf("Error '%s' is not used by any cases or data providers", $error->id)) unless ($used);
261+
warn(sprintf("Error '%s' is not used by any cases or data providers", $error->id)) unless ($used);
262+
}
261263
}
262264

263265
sub check_provider {

0 commit comments

Comments
 (0)