summaryrefslogtreecommitdiff
path: root/tests/files/success/test_merge.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/success/test_merge.yaml
Import upstream version 1.7.0
Diffstat (limited to 'tests/files/success/test_merge.yaml')
-rw-r--r--tests/files/success/test_merge.yaml36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/files/success/test_merge.yaml b/tests/files/success/test_merge.yaml
new file mode 100644
index 0000000..1e0a94d
--- /dev/null
+++ b/tests/files/success/test_merge.yaml
@@ -0,0 +1,36 @@
+##
+---
+name: merge1
+desc: merge maps
+#
+schema:
+ type: map
+ mapping:
+ "group":
+ type: map
+ mapping:
+ "name": &name
+ type: str
+ required: True
+ "email": &email
+ type: str
+ pattern: .+@.+
+ required: False
+ "user":
+ type: map
+ mapping:
+ "name":
+ <<: *name # merge
+ length:
+ max: 16 # add
+ "email":
+ <<: *email # merge
+ required: True # override
+#
+data:
+ group:
+ name: foo
+ email: foo@mail.com
+ user:
+ name: bar
+ email: bar@mail.com