summaryrefslogtreecommitdiff
path: root/tests/files/fail/test_type_map.yaml
diff options
context:
space:
mode:
authorJohan Fleury <jfleury@arcaik.net>2018-10-08 12:58:12 -0400
committerJohan Fleury <jfleury@arcaik.net>2018-10-08 12:58:12 -0400
commit735c78d3ecb695dd16cb37879880f522c4b29c72 (patch)
tree8bfb2ecbd0f03730efa1540cc65d8490b67e8ddd /tests/files/fail/test_type_map.yaml
Import upstream version 1.7.0
Diffstat (limited to 'tests/files/fail/test_type_map.yaml')
-rw-r--r--tests/files/fail/test_type_map.yaml46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/files/fail/test_type_map.yaml b/tests/files/fail/test_type_map.yaml
new file mode 100644
index 0000000..a46086b
--- /dev/null
+++ b/tests/files/fail/test_type_map.yaml
@@ -0,0 +1,46 @@
+---
+name: fail-type-map-1
+desc: Test the most basic case for map
+data:
+ - 'foo'
+schema:
+ type: map
+ mapping:
+ foo:
+ type: str
+errors:
+ - "Value '['foo']' is not a dict. Value path: ''"
+---
+name: type-map-2
+desc:
+data:
+ - - 'foo'
+ - - 'foo'
+schema:
+ type: seq
+ sequence:
+ - type: map
+ mapping:
+ foo:
+ type: str
+errors:
+ - "Value '['foo']' is not a dict. Value path: '/0'"
+ - "Value '['foo']' is not a dict. Value path: '/1'"
+---
+name: type-map-3
+desc: Test bool inside nested map & seq
+data:
+ foo:
+ - - 'foo'
+schema:
+ type: map
+ mapping:
+ foo:
+ type: seq
+ sequence:
+ - type: map
+ mapping:
+ bar:
+ type: str
+errors:
+ - "Value '['foo']' is not a dict. Value path: '/foo/0'"