Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LI - Lawful Interception
TC LI schemas definitions
Commits
3adbf765
Commit
3adbf765
authored
Mar 28, 2022
by
canterburym
Browse files
Correcting validation
parent
a9edda0e
Changes
5
Hide whitespace changes
Inline
Side-by-side
103221-1/examples/GetTaskDetailsResponse_example.xml
View file @
3adbf765
...
...
@@ -16,7 +16,7 @@
</ns1:targetIdentifiers>
<ns1:deliveryType>
X2andX3
</ns1:deliveryType>
<ns1:listOfDIDs>
<ns1:dId>
1eb4406a-8b28-41fd-8f0f-e1a0a3eb5ff9
foooo
</ns1:dId>
<ns1:dId>
1eb4406a-8b28-41fd-8f0f-e1a0a3eb5ff9
</ns1:dId>
</ns1:listOfDIDs>
</ns1:taskDetails>
<ns1:taskStatus>
...
...
testing/mod1.asn
deleted
100644 → 0
View file @
a9edda0e
Mod1 {itu-t(0) identified-organization(4) etsi(0)}
DEFINITIONS ::=
BEGIN
IMPORTS
ImportedField,
ClashField
FROM Mod2 {itu-t(0) identified-organization(4) etsi(1)};
TestPDU ::= SEQUENCE
{
field1 [1] ClashField
}
ClashField ::= BOOLEAN
END
testing/mod2.asn
deleted
100644 → 0
View file @
a9edda0e
Mod2 {itu-t(0) identified-organization(4) etsi(1)}
DEFINITIONS ::=
BEGIN
ImportedField ::= SEQUENCE
{
field2 [0] BOOLEAN
}
ClashField ::= INTEGER
END
testing/xsd_compile_targets.json
View file @
3adbf765
...
...
@@ -20,5 +20,29 @@
"exampleFiles"
:
[
"103221-1/examples"
]
},
{
"coreSchema"
:
"103120/dictionaries/ts_103120_Dictionaries.xsd"
,
"supportingSchemas"
:
[],
"exampleFiles"
:
[
"103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml"
]
},
{
"coreSchema"
:
"103120/schema/ts_103120_Core.xsd"
,
"supportingSchemas"
:
[
"103120/schema/ts_103120_Authorisation.xsd"
,
"103120/schema/ts_103120_Common.xsd"
,
"103120/schema/ts_103120_Delivery.xsd"
,
"103120/schema/ts_103120_Document.xsd"
,
"103120/schema/ts_103120_Notification.xsd"
,
"103120/schema/ts_103120_Task.xsd"
,
"103280/TS_103_280.xsd"
,
"testing/deps/xmldsig/xmldsig-core-schema.xsd"
,
"103120/examples/FooServiceSchema.xsd"
],
"exampleFiles"
:
[
"103120/examples"
]
}
]
\ No newline at end of file
testing/xsd_process.py
View file @
3adbf765
...
...
@@ -141,7 +141,7 @@ if __name__ == '__main__':
logging
.
debug
(
f
"Adding supporting schema
{
supportSchema
}
"
)
try
:
xs
=
XMLSchema
(
supportSchema
,
validation
=
'skip'
)
schemaLocations
.
append
((
xs
.
defaul
t_namespace
,
str
(
Path
(
supportSchema
).
resolve
())))
schemaLocations
.
append
((
xs
.
targe
t_namespace
,
str
(
Path
(
supportSchema
).
resolve
())))
logging
.
info
(
" [ {0} -> {1} ]"
.
format
(
xs
.
default_namespace
,
supportSchema
))
except
Exception
as
ex
:
logging
.
warning
(
" [ {0} exception parsing: {1} ]"
.
format
(
supportSchema
,
ex
))
...
...
@@ -176,7 +176,7 @@ if __name__ == '__main__':
logging
.
info
(
f
"Validating example
{
len
(
target
[
'exampleFiles'
])
}
entries for
{
target
[
'coreSchema'
]
}
"
)
for
example
in
target
[
"exampleFiles"
]:
examplePath
=
Path
(
example
)
if
examplePath
.
is_dir
:
if
examplePath
.
is_dir
()
:
logging
.
debug
(
f
"Expanding
{
str
(
examplePath
)
}
"
)
testFiles
=
list
(
examplePath
.
rglob
(
"./*.xml"
))
else
:
...
...
@@ -203,12 +203,17 @@ if __name__ == '__main__':
totalErrors
=
0
for
filename
,
result
in
results
.
items
():
print
(
f
"
{
filename
:
.
<
70
}{
'..OK'
if
result
[
'ok'
]
else
'FAIL'
}
"
)
totalErrors
+=
result
[
'failureCount'
]
for
testFile
,
testResult
in
result
[
'testResults'
].
items
():
print
(
f
"
{
str
(
testFile
)
:
.
<
65
}{
'..OK'
if
len
(
testResult
)
==
0
else
'FAIL'
}
"
)
for
tr
in
testResult
:
print
(
f
"
{
tr
}
"
)
if
len
(
result
[
'testResults'
])
==
0
:
print
(
f
"
{
filename
:
.
<
70
}
SKIP (0)"
)
continue
else
:
print
(
f
"
{
filename
:
.
<
70
}{
'..OK'
if
result
[
'ok'
]
else
'FAIL'
}
(
{
len
(
result
[
'testResults'
])
}
)"
)
totalErrors
+=
result
[
'failureCount'
]
if
result
[
'failureCount'
]
>
0
:
for
testFile
,
testResult
in
result
[
'testResults'
].
items
():
print
(
f
"
{
str
(
testFile
)
:
.
<
65
}{
'..OK'
if
len
(
testResult
)
==
0
else
'FAIL'
}
"
)
for
tr
in
testResult
:
print
(
f
"
{
tr
}
"
)
print
(
f
"
{
'-'
:
-<
75
}
"
)
print
(
f
"Validation errors:
{
totalErrors
}
"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment