Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.core
Commits
0ad84f12
Commit
0ad84f12
authored
May 31, 2019
by
Jaden
Committed by
Samuel GAIST
Oct 19, 2020
Browse files
[dataformat] fix complex types & add test
parent
289f2e82
Pipeline
#44351
failed with stage
in 39 minutes and 25 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/core/schema/dataformat/1.json
View file @
0ad84f12
...
...
@@ -46,6 +46,7 @@
{
"type"
:
"integer"
},
{
"oneOf"
:
[
{
"$ref"
:
"#/definitions/complextype"
},
{
"$ref"
:
"../common/1.json#/definitions/basetype"
},
{
"$ref"
:
"../common/1.json#/definitions/reference"
},
{
"$ref"
:
"#"
}
...
...
@@ -64,6 +65,7 @@
{
"type"
:
"integer"
},
{
"oneOf"
:
[
{
"$ref"
:
"#/definitions/complextype"
},
{
"$ref"
:
"../common/1.json#/definitions/basetype"
},
{
"$ref"
:
"../common/1.json#/definitions/reference"
},
{
"$ref"
:
"#"
}
...
...
@@ -83,6 +85,7 @@
{
"type"
:
"integer"
},
{
"oneOf"
:
[
{
"$ref"
:
"#/definitions/complextype"
},
{
"$ref"
:
"../common/1.json#/definitions/basetype"
},
{
"$ref"
:
"../common/1.json#/definitions/reference"
},
{
"$ref"
:
"#"
}
...
...
@@ -103,6 +106,7 @@
{
"type"
:
"integer"
},
{
"oneOf"
:
[
{
"$ref"
:
"#/definitions/complextype"
},
{
"$ref"
:
"../common/1.json#/definitions/basetype"
},
{
"$ref"
:
"../common/1.json#/definitions/reference"
},
{
"$ref"
:
"#"
}
...
...
@@ -124,6 +128,7 @@
{
"type"
:
"integer"
},
{
"oneOf"
:
[
{
"$ref"
:
"#/definitions/complextype"
},
{
"$ref"
:
"../common/1.json#/definitions/basetype"
},
{
"$ref"
:
"../common/1.json#/definitions/reference"
},
{
"$ref"
:
"#"
}
...
...
beat/core/test/prefix/dataformats/user/complex/1.json
0 → 100644
View file @
0ad84f12
{
"#description"
:
"A dataformat with complex types"
,
"param_complex_64"
:
"complex64"
,
"param_complex_128"
:
"complex128"
,
"complex_array"
:
[
0
,
0
,
"complex64"
]
}
beat/core/test/test_format_load.py
View file @
0ad84f12
...
...
@@ -167,6 +167,12 @@ def test_load_indirect_recursion():
)
def
test_load_complex
():
"""tests that the system accepts complex types in dataformats"""
df
=
DataFormat
(
prefix
,
"user/complex/1"
)
nose
.
tools
.
assert_true
(
df
.
valid
,
"
\n
* %s"
%
"
\n
* "
.
join
(
df
.
errors
))
@
nose
.
tools
.
with_setup
(
teardown
=
cleanup
)
def
test_export
():
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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