summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/cfg/routing
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
commit72231250ed81e10d66bfe70701e64fa5fe50f712 (patch)
tree2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /config-model/src/test/cfg/routing
Publish
Diffstat (limited to 'config-model/src/test/cfg/routing')
-rwxr-xr-xconfig-model/src/test/cfg/routing/content_two_clusters/documentrouteselectorpolicy.cfg6
-rw-r--r--config-model/src/test/cfg/routing/content_two_clusters/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/content_two_clusters/messagebus.cfg44
-rw-r--r--config-model/src/test/cfg/routing/content_two_clusters/searchdefinitions/mobile.sd15
-rw-r--r--config-model/src/test/cfg/routing/content_two_clusters/searchdefinitions/music.sd13
-rw-r--r--config-model/src/test/cfg/routing/content_two_clusters/services.xml31
-rwxr-xr-xconfig-model/src/test/cfg/routing/contentsimpleconfig/documentrouteselectorpolicy.cfg3
-rw-r--r--config-model/src/test/cfg/routing/contentsimpleconfig/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/contentsimpleconfig/messagebus.cfg25
-rw-r--r--config-model/src/test/cfg/routing/contentsimpleconfig/searchdefinitions/music.sd13
-rw-r--r--config-model/src/test/cfg/routing/contentsimpleconfig/services.xml21
-rwxr-xr-xconfig-model/src/test/cfg/routing/defaultconfig/documentrouteselectorpolicy.cfg1
-rwxr-xr-xconfig-model/src/test/cfg/routing/defaultconfig/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/defaultconfig/messagebus.cfg6
-rwxr-xr-xconfig-model/src/test/cfg/routing/defaultconfig/services.xml13
-rwxr-xr-xconfig-model/src/test/cfg/routing/duplicatehop/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/duplicatehop/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/duplicatehop/services.xml18
-rwxr-xr-xconfig-model/src/test/cfg/routing/duplicateroute/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/duplicateroute/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/duplicateroute/services.xml18
-rwxr-xr-xconfig-model/src/test/cfg/routing/emptyhop/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/emptyhop/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/emptyhop/services.xml13
-rwxr-xr-xconfig-model/src/test/cfg/routing/emptyroute/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/emptyroute/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/emptyroute/services.xml13
-rwxr-xr-xconfig-model/src/test/cfg/routing/hopconfig/documentrouteselectorpolicy.cfg1
-rwxr-xr-xconfig-model/src/test/cfg/routing/hopconfig/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/hopconfig/messagebus.cfg15
-rwxr-xr-xconfig-model/src/test/cfg/routing/hopconfig/services.xml24
-rwxr-xr-xconfig-model/src/test/cfg/routing/hoperror/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/hoperror/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/hoperror/services.xml13
-rwxr-xr-xconfig-model/src/test/cfg/routing/hoperrorinrecipient/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/hoperrorinrecipient/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/hoperrorinrecipient/services.xml15
-rwxr-xr-xconfig-model/src/test/cfg/routing/hoperrorinroute/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/hoperrorinroute/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/hoperrorinroute/services.xml13
-rwxr-xr-xconfig-model/src/test/cfg/routing/hopnotfound/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/hopnotfound/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/hopnotfound/services.xml13
-rw-r--r--config-model/src/test/cfg/routing/invalidstoragepolicy/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/invalidstoragepolicy/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/invalidstoragepolicy/services.xml11
-rwxr-xr-xconfig-model/src/test/cfg/routing/mismatchedrecipient/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/mismatchedrecipient/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/mismatchedrecipient/services.xml15
-rwxr-xr-xconfig-model/src/test/cfg/routing/replacehop/documentrouteselectorpolicy.cfg3
-rwxr-xr-xconfig-model/src/test/cfg/routing/replacehop/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/replacehop/messagebus.cfg22
-rwxr-xr-xconfig-model/src/test/cfg/routing/replacehop/searchdefinitions/music.sd13
-rwxr-xr-xconfig-model/src/test/cfg/routing/replacehop/services.xml32
-rwxr-xr-xconfig-model/src/test/cfg/routing/replaceroute/documentrouteselectorpolicy.cfg3
-rwxr-xr-xconfig-model/src/test/cfg/routing/replaceroute/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/replaceroute/messagebus.cfg19
-rwxr-xr-xconfig-model/src/test/cfg/routing/replaceroute/searchdefinitions/music.sd13
-rwxr-xr-xconfig-model/src/test/cfg/routing/replaceroute/services.xml28
-rwxr-xr-xconfig-model/src/test/cfg/routing/routeconfig/documentrouteselectorpolicy.cfg1
-rwxr-xr-xconfig-model/src/test/cfg/routing/routeconfig/hosts.xml7
-rwxr-xr-xconfig-model/src/test/cfg/routing/routeconfig/messagebus.cfg7
-rwxr-xr-xconfig-model/src/test/cfg/routing/routeconfig/services.xml14
-rwxr-xr-xconfig-model/src/test/cfg/routing/routenotfound/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/routenotfound/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/routenotfound/services.xml13
-rwxr-xr-xconfig-model/src/test/cfg/routing/routenotfoundinroute/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/routenotfoundinroute/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/routenotfoundinroute/services.xml13
-rwxr-xr-xconfig-model/src/test/cfg/routing/servicenotfound/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/servicenotfound/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/servicenotfound/services.xml15
-rwxr-xr-xconfig-model/src/test/cfg/routing/unexpectedrecipient/errors.txt1
-rw-r--r--config-model/src/test/cfg/routing/unexpectedrecipient/hosts.xml7
-rw-r--r--config-model/src/test/cfg/routing/unexpectedrecipient/services.xml20
75 files changed, 750 insertions, 0 deletions
diff --git a/config-model/src/test/cfg/routing/content_two_clusters/documentrouteselectorpolicy.cfg b/config-model/src/test/cfg/routing/content_two_clusters/documentrouteselectorpolicy.cfg
new file mode 100755
index 00000000000..657b05d63b7
--- /dev/null
+++ b/config-model/src/test/cfg/routing/content_two_clusters/documentrouteselectorpolicy.cfg
@@ -0,0 +1,6 @@
+route[0].name "content/mobile"
+route[0].selector "mobile or mobile_search"
+route[0].feed ""
+route[1].name "content/music"
+route[1].selector "music or music_search"
+route[1].feed ""
diff --git a/config-model/src/test/cfg/routing/content_two_clusters/hosts.xml b/config-model/src/test/cfg/routing/content_two_clusters/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/content_two_clusters/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/content_two_clusters/messagebus.cfg b/config-model/src/test/cfg/routing/content_two_clusters/messagebus.cfg
new file mode 100755
index 00000000000..3860bf71431
--- /dev/null
+++ b/config-model/src/test/cfg/routing/content_two_clusters/messagebus.cfg
@@ -0,0 +1,44 @@
+routingtable[0].protocol "document"
+routingtable[0].hop[0].name "docproc/cluster.mobile.indexing/chain.mobile.indexing"
+routingtable[0].hop[0].selector "[LoadBalancer:cluster=docproc/cluster.mobile.indexing;session=chain.mobile.indexing]"
+routingtable[0].hop[0].ignoreresult false
+routingtable[0].hop[1].name "docproc/cluster.music.indexing/chain.music.indexing"
+routingtable[0].hop[1].selector "[LoadBalancer:cluster=docproc/cluster.music.indexing;session=chain.music.indexing]"
+routingtable[0].hop[1].ignoreresult false
+routingtable[0].hop[2].name "indexing"
+routingtable[0].hop[2].selector "[DocumentRouteSelector]"
+routingtable[0].hop[2].recipient[0] "content/mobile"
+routingtable[0].hop[2].recipient[1] "content/music"
+routingtable[0].hop[2].ignoreresult false
+routingtable[0].route[0].name "content/mobile"
+routingtable[0].route[0].hop[0] "[MessageType:content/mobile]"
+routingtable[0].route[1].name "content/mobile-direct"
+routingtable[0].route[1].hop[0] "[Content:cluster=mobile]"
+routingtable[0].route[2].name "content/mobile-index"
+routingtable[0].route[2].hop[0] "docproc/cluster.mobile.indexing/chain.mobile.indexing"
+routingtable[0].route[2].hop[1] "[Content:cluster=mobile]"
+routingtable[0].route[3].name "content/music"
+routingtable[0].route[3].hop[0] "[MessageType:content/music]"
+routingtable[0].route[4].name "content/music-direct"
+routingtable[0].route[4].hop[0] "[Content:cluster=music]"
+routingtable[0].route[5].name "content/music-index"
+routingtable[0].route[5].hop[0] "docproc/cluster.music.indexing/chain.music.indexing"
+routingtable[0].route[5].hop[1] "[Content:cluster=music]"
+routingtable[0].route[6].name "default"
+routingtable[0].route[6].hop[0] "indexing"
+routingtable[0].route[7].name "mobile"
+routingtable[0].route[7].hop[0] "route:content/mobile"
+routingtable[0].route[8].name "mobile-direct"
+routingtable[0].route[8].hop[0] "route:content/mobile-direct"
+routingtable[0].route[9].name "mobile-index"
+routingtable[0].route[9].hop[0] "route:content/mobile-index"
+routingtable[0].route[10].name "music"
+routingtable[0].route[10].hop[0] "route:content/music"
+routingtable[0].route[11].name "music-direct"
+routingtable[0].route[11].hop[0] "route:content/music-direct"
+routingtable[0].route[12].name "music-index"
+routingtable[0].route[12].hop[0] "route:content/music-index"
+routingtable[0].route[13].name "storage/cluster.mobile"
+routingtable[0].route[13].hop[0] "route:content/mobile"
+routingtable[0].route[14].name "storage/cluster.music"
+routingtable[0].route[14].hop[0] "route:content/music"
diff --git a/config-model/src/test/cfg/routing/content_two_clusters/searchdefinitions/mobile.sd b/config-model/src/test/cfg/routing/content_two_clusters/searchdefinitions/mobile.sd
new file mode 100644
index 00000000000..ee52751f137
--- /dev/null
+++ b/config-model/src/test/cfg/routing/content_two_clusters/searchdefinitions/mobile.sd
@@ -0,0 +1,15 @@
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+search mobile {
+ document mobile {
+ field f1 type string {
+ indexing: summary | index
+ # index-to: f1, all
+ header
+ }
+ field f2 type string {
+ indexing: summary | index
+ # index-to: f2, all
+ body
+ }
+ }
+}
diff --git a/config-model/src/test/cfg/routing/content_two_clusters/searchdefinitions/music.sd b/config-model/src/test/cfg/routing/content_two_clusters/searchdefinitions/music.sd
new file mode 100644
index 00000000000..136efeafaf6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/content_two_clusters/searchdefinitions/music.sd
@@ -0,0 +1,13 @@
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+search music {
+ document music {
+ field f1 type string {
+ indexing: summary | index
+ # index-to: f1, all
+ }
+ field f2 type string {
+ indexing: summary | index
+ # index-to: f2, all
+ }
+ }
+}
diff --git a/config-model/src/test/cfg/routing/content_two_clusters/services.xml b/config-model/src/test/cfg/routing/content_two_clusters/services.xml
new file mode 100644
index 00000000000..df9717c4980
--- /dev/null
+++ b/config-model/src/test/cfg/routing/content_two_clusters/services.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ <logserver hostalias="node1" />
+ <slobroks>
+ <slobrok hostalias="node1" />
+ </slobroks>
+ </admin>
+
+ <content version="1.0" id="music">
+ <redundancy>1</redundancy>
+ <documents>
+ <document type="music" mode="index"/>
+ </documents>
+ <group name="mygroup">
+ <node hostalias="node1" distribution-key="0" />
+ </group>
+ </content>
+
+ <content version="1.0" id="mobile">
+ <redundancy>1</redundancy>
+ <documents>
+ <document type="mobile" mode="index"/>
+ </documents>
+ <group name="mygroup">
+ <node hostalias="node1" distribution-key="0" />
+ </group>
+ </content>
+</services>
diff --git a/config-model/src/test/cfg/routing/contentsimpleconfig/documentrouteselectorpolicy.cfg b/config-model/src/test/cfg/routing/contentsimpleconfig/documentrouteselectorpolicy.cfg
new file mode 100755
index 00000000000..7e7a546235c
--- /dev/null
+++ b/config-model/src/test/cfg/routing/contentsimpleconfig/documentrouteselectorpolicy.cfg
@@ -0,0 +1,3 @@
+route[0].name "content/music"
+route[0].selector "music or music_search"
+route[0].feed ""
diff --git a/config-model/src/test/cfg/routing/contentsimpleconfig/hosts.xml b/config-model/src/test/cfg/routing/contentsimpleconfig/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/contentsimpleconfig/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/contentsimpleconfig/messagebus.cfg b/config-model/src/test/cfg/routing/contentsimpleconfig/messagebus.cfg
new file mode 100755
index 00000000000..e1c87a4274d
--- /dev/null
+++ b/config-model/src/test/cfg/routing/contentsimpleconfig/messagebus.cfg
@@ -0,0 +1,25 @@
+routingtable[0].protocol "document"
+routingtable[0].hop[0].name "docproc/cluster.music.indexing/chain.music.indexing"
+routingtable[0].hop[0].selector "[LoadBalancer:cluster=docproc/cluster.music.indexing;session=chain.music.indexing]"
+routingtable[0].hop[0].ignoreresult false
+routingtable[0].hop[1].name "indexing"
+routingtable[0].hop[1].selector "[DocumentRouteSelector]"
+routingtable[0].hop[1].recipient[0] "content/music"
+routingtable[0].hop[1].ignoreresult false
+routingtable[0].route[0].name "content/music"
+routingtable[0].route[0].hop[0] "[MessageType:content/music]"
+routingtable[0].route[1].name "content/music-direct"
+routingtable[0].route[1].hop[0] "[Content:cluster=music]"
+routingtable[0].route[2].name "content/music-index"
+routingtable[0].route[2].hop[0] "docproc/cluster.music.indexing/chain.music.indexing"
+routingtable[0].route[2].hop[1] "[Content:cluster=music]"
+routingtable[0].route[3].name "default"
+routingtable[0].route[3].hop[0] "indexing"
+routingtable[0].route[4].name "music"
+routingtable[0].route[4].hop[0] "route:content/music"
+routingtable[0].route[5].name "music-direct"
+routingtable[0].route[5].hop[0] "route:content/music-direct"
+routingtable[0].route[6].name "music-index"
+routingtable[0].route[6].hop[0] "route:content/music-index"
+routingtable[0].route[7].name "storage/cluster.music"
+routingtable[0].route[7].hop[0] "route:content/music"
diff --git a/config-model/src/test/cfg/routing/contentsimpleconfig/searchdefinitions/music.sd b/config-model/src/test/cfg/routing/contentsimpleconfig/searchdefinitions/music.sd
new file mode 100644
index 00000000000..136efeafaf6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/contentsimpleconfig/searchdefinitions/music.sd
@@ -0,0 +1,13 @@
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+search music {
+ document music {
+ field f1 type string {
+ indexing: summary | index
+ # index-to: f1, all
+ }
+ field f2 type string {
+ indexing: summary | index
+ # index-to: f2, all
+ }
+ }
+}
diff --git a/config-model/src/test/cfg/routing/contentsimpleconfig/services.xml b/config-model/src/test/cfg/routing/contentsimpleconfig/services.xml
new file mode 100644
index 00000000000..b46e126444f
--- /dev/null
+++ b/config-model/src/test/cfg/routing/contentsimpleconfig/services.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ <logserver hostalias="node1" />
+ <slobroks>
+ <slobrok hostalias="node1" />
+ </slobroks>
+ </admin>
+
+ <content version="1.0" id="c">
+ <redundancy>1</redundancy>
+ <documents>
+ <document type="music" mode="index"/>
+ </documents>
+ <group name="mygroup">
+ <node hostalias="node1" distribution-key="0" />
+ </group>
+ </content>
+</services>
diff --git a/config-model/src/test/cfg/routing/defaultconfig/documentrouteselectorpolicy.cfg b/config-model/src/test/cfg/routing/defaultconfig/documentrouteselectorpolicy.cfg
new file mode 100755
index 00000000000..8b137891791
--- /dev/null
+++ b/config-model/src/test/cfg/routing/defaultconfig/documentrouteselectorpolicy.cfg
@@ -0,0 +1 @@
+
diff --git a/config-model/src/test/cfg/routing/defaultconfig/hosts.xml b/config-model/src/test/cfg/routing/defaultconfig/hosts.xml
new file mode 100755
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/defaultconfig/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/defaultconfig/messagebus.cfg b/config-model/src/test/cfg/routing/defaultconfig/messagebus.cfg
new file mode 100755
index 00000000000..bddd1de480c
--- /dev/null
+++ b/config-model/src/test/cfg/routing/defaultconfig/messagebus.cfg
@@ -0,0 +1,6 @@
+routingtable[0].protocol "document"
+routingtable[0].route[0].name "aliasme"
+routingtable[0].route[0].hop[0] "docproc/cluster.music.indexing/*/chain.music.indexing"
+routingtable[0].route[0].hop[1] "search/search.music"
+routingtable[0].route[1].name "default"
+routingtable[0].route[1].hop[0] "route:aliasme"
diff --git a/config-model/src/test/cfg/routing/defaultconfig/services.xml b/config-model/src/test/cfg/routing/defaultconfig/services.xml
new file mode 100755
index 00000000000..03e6ac9ae9c
--- /dev/null
+++ b/config-model/src/test/cfg/routing/defaultconfig/services.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document" verify="false">
+ <route name="aliasme" hops="docproc/cluster.music.indexing/*/chain.music.indexing search/search.music" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/duplicatehop/errors.txt b/config-model/src/test/cfg/routing/duplicatehop/errors.txt
new file mode 100755
index 00000000000..ca0e52d6fb3
--- /dev/null
+++ b/config-model/src/test/cfg/routing/duplicatehop/errors.txt
@@ -0,0 +1 @@
+Hop 'foo' in routing table 'document' is defined 2 times.
diff --git a/config-model/src/test/cfg/routing/duplicatehop/hosts.xml b/config-model/src/test/cfg/routing/duplicatehop/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/duplicatehop/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/duplicatehop/services.xml b/config-model/src/test/cfg/routing/duplicatehop/services.xml
new file mode 100755
index 00000000000..e69f2bf5798
--- /dev/null
+++ b/config-model/src/test/cfg/routing/duplicatehop/services.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="foo" selector="bar/baz" />
+ <hop name="foo" selector="baz/cox" />
+ </routingtable>
+ <services protocol="document">
+ <service name="bar/baz" />
+ <service name="baz/cox" />
+ </services>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/duplicateroute/errors.txt b/config-model/src/test/cfg/routing/duplicateroute/errors.txt
new file mode 100755
index 00000000000..2fd943e5a27
--- /dev/null
+++ b/config-model/src/test/cfg/routing/duplicateroute/errors.txt
@@ -0,0 +1 @@
+Route 'foo' in routing table 'document' is defined 2 times.
diff --git a/config-model/src/test/cfg/routing/duplicateroute/hosts.xml b/config-model/src/test/cfg/routing/duplicateroute/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/duplicateroute/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/duplicateroute/services.xml b/config-model/src/test/cfg/routing/duplicateroute/services.xml
new file mode 100755
index 00000000000..33fc9a12717
--- /dev/null
+++ b/config-model/src/test/cfg/routing/duplicateroute/services.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <route name="foo" hops="bar" />
+ <route name="foo" hops="baz" />
+ </routingtable>
+ <services protocol="document">
+ <service name="bar" />
+ <service name="baz" />
+ </services>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/emptyhop/errors.txt b/config-model/src/test/cfg/routing/emptyhop/errors.txt
new file mode 100755
index 00000000000..85317424e5b
--- /dev/null
+++ b/config-model/src/test/cfg/routing/emptyhop/errors.txt
@@ -0,0 +1 @@
+For hop 'foo' in routing table 'document'; Failed to parse empty string.
diff --git a/config-model/src/test/cfg/routing/emptyhop/hosts.xml b/config-model/src/test/cfg/routing/emptyhop/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/emptyhop/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/emptyhop/services.xml b/config-model/src/test/cfg/routing/emptyhop/services.xml
new file mode 100644
index 00000000000..1cb8136219b
--- /dev/null
+++ b/config-model/src/test/cfg/routing/emptyhop/services.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="foo" selector="" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/emptyroute/errors.txt b/config-model/src/test/cfg/routing/emptyroute/errors.txt
new file mode 100755
index 00000000000..66f38f6cabe
--- /dev/null
+++ b/config-model/src/test/cfg/routing/emptyroute/errors.txt
@@ -0,0 +1 @@
+Route 'foo' in routing table 'document' has no hops.
diff --git a/config-model/src/test/cfg/routing/emptyroute/hosts.xml b/config-model/src/test/cfg/routing/emptyroute/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/emptyroute/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/emptyroute/services.xml b/config-model/src/test/cfg/routing/emptyroute/services.xml
new file mode 100644
index 00000000000..4112fdf2062
--- /dev/null
+++ b/config-model/src/test/cfg/routing/emptyroute/services.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <route name="foo" hops="" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/hopconfig/documentrouteselectorpolicy.cfg b/config-model/src/test/cfg/routing/hopconfig/documentrouteselectorpolicy.cfg
new file mode 100755
index 00000000000..8b137891791
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hopconfig/documentrouteselectorpolicy.cfg
@@ -0,0 +1 @@
+
diff --git a/config-model/src/test/cfg/routing/hopconfig/hosts.xml b/config-model/src/test/cfg/routing/hopconfig/hosts.xml
new file mode 100755
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hopconfig/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/hopconfig/messagebus.cfg b/config-model/src/test/cfg/routing/hopconfig/messagebus.cfg
new file mode 100755
index 00000000000..f15f89f3a58
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hopconfig/messagebus.cfg
@@ -0,0 +1,15 @@
+routingtable[0].protocol "document"
+routingtable[0].hop[0].name "backdoor"
+routingtable[0].hop[0].selector "search/cluster.music/[SearchRow:1]/[SearchColumn:1]/feed-destination"
+routingtable[0].hop[0].recipient[0] "search/cluster.music/r0/c0/feed-destination"
+routingtable[0].hop[0].recipient[1] "search/cluster.music/r0/c1/feed-destination"
+routingtable[0].hop[0].recipient[2] "search/cluster.music/r1/c0/feed-destination"
+routingtable[0].hop[0].recipient[3] "search/cluster.music/r1/c1/feed-destination"
+routingtable[0].hop[0].recipient[4] "search/cluster.music/r0/c0/feed-destination"
+routingtable[0].hop[0].recipient[5] "search/cluster.music/r0/c1/feed-destination"
+routingtable[0].hop[0].recipient[6] "search/cluster.music/r1/c0/feed-destination"
+routingtable[0].hop[0].recipient[7] "search/cluster.music/r1/c1/feed-destination"
+routingtable[0].hop[0].ignoreresult false
+routingtable[0].hop[1].name "foo"
+routingtable[0].hop[1].selector "bar"
+routingtable[0].hop[1].ignoreresult true
diff --git a/config-model/src/test/cfg/routing/hopconfig/services.xml b/config-model/src/test/cfg/routing/hopconfig/services.xml
new file mode 100755
index 00000000000..87b18f4ceda
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hopconfig/services.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document" verify="false">
+ <hop name="backdoor" selector=
+ "search/cluster.music/[SearchRow:1]/[SearchColumn:1]/feed-destination">
+ <recipient session="search/cluster.music/r0/c0/feed-destination" />
+ <recipient session="search/cluster.music/r0/c1/feed-destination" />
+ <recipient session="search/cluster.music/r1/c0/feed-destination" />
+ <recipient session="search/cluster.music/r1/c1/feed-destination" />
+ <recipient session="search/cluster.music/r0/c0/feed-destination" />
+ <recipient session="search/cluster.music/r0/c1/feed-destination" />
+ <recipient session="search/cluster.music/r1/c0/feed-destination" />
+ <recipient session="search/cluster.music/r1/c1/feed-destination" />
+ </hop>
+ <hop name="foo" selector="bar" ignore-result="true" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/hoperror/errors.txt b/config-model/src/test/cfg/routing/hoperror/errors.txt
new file mode 100755
index 00000000000..fd0ec8b453c
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperror/errors.txt
@@ -0,0 +1 @@
+For hop 'foo' in routing table 'document'; Failed to completely parse 'bar/baz cox'.
diff --git a/config-model/src/test/cfg/routing/hoperror/hosts.xml b/config-model/src/test/cfg/routing/hoperror/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperror/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/hoperror/services.xml b/config-model/src/test/cfg/routing/hoperror/services.xml
new file mode 100644
index 00000000000..f31a60d03d7
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperror/services.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="foo" selector="bar/baz cox" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/hoperrorinrecipient/errors.txt b/config-model/src/test/cfg/routing/hoperrorinrecipient/errors.txt
new file mode 100755
index 00000000000..339a569bf6e
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperrorinrecipient/errors.txt
@@ -0,0 +1 @@
+For recipient '[baz]]' in hop 'foo' in routing table 'document'; Unexpected token ']' in '[baz]]'
diff --git a/config-model/src/test/cfg/routing/hoperrorinrecipient/hosts.xml b/config-model/src/test/cfg/routing/hoperrorinrecipient/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperrorinrecipient/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/hoperrorinrecipient/services.xml b/config-model/src/test/cfg/routing/hoperrorinrecipient/services.xml
new file mode 100644
index 00000000000..e2a0a5827be
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperrorinrecipient/services.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="foo" selector="[bar]">
+ <recipient session="[baz]]" />
+ </hop>
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/hoperrorinroute/errors.txt b/config-model/src/test/cfg/routing/hoperrorinroute/errors.txt
new file mode 100755
index 00000000000..4640a965903
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperrorinroute/errors.txt
@@ -0,0 +1 @@
+For hop 1 in route 'foo' in routing table 'document'; Unexpected token ']' in '[bar]] baz'
diff --git a/config-model/src/test/cfg/routing/hoperrorinroute/hosts.xml b/config-model/src/test/cfg/routing/hoperrorinroute/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperrorinroute/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/hoperrorinroute/services.xml b/config-model/src/test/cfg/routing/hoperrorinroute/services.xml
new file mode 100644
index 00000000000..61a334440fc
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hoperrorinroute/services.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <route name="foo" hops="[bar]] baz" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/hopnotfound/errors.txt b/config-model/src/test/cfg/routing/hopnotfound/errors.txt
new file mode 100755
index 00000000000..8b999742157
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hopnotfound/errors.txt
@@ -0,0 +1 @@
+Hop 1 in route 'foo' in routing table 'document' references 'bar' which is neither a service, a route nor another hop.
diff --git a/config-model/src/test/cfg/routing/hopnotfound/hosts.xml b/config-model/src/test/cfg/routing/hopnotfound/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hopnotfound/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/hopnotfound/services.xml b/config-model/src/test/cfg/routing/hopnotfound/services.xml
new file mode 100644
index 00000000000..ed859c34a8f
--- /dev/null
+++ b/config-model/src/test/cfg/routing/hopnotfound/services.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <route name="foo" hops="bar" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/invalidstoragepolicy/errors.txt b/config-model/src/test/cfg/routing/invalidstoragepolicy/errors.txt
new file mode 100644
index 00000000000..797dee3fd88
--- /dev/null
+++ b/config-model/src/test/cfg/routing/invalidstoragepolicy/errors.txt
@@ -0,0 +1 @@
+Can't use storage policy with only slobrok in 5.0 and hierarchical grouping \ No newline at end of file
diff --git a/config-model/src/test/cfg/routing/invalidstoragepolicy/hosts.xml b/config-model/src/test/cfg/routing/invalidstoragepolicy/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/invalidstoragepolicy/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/invalidstoragepolicy/services.xml b/config-model/src/test/cfg/routing/invalidstoragepolicy/services.xml
new file mode 100644
index 00000000000..806e1cde02c
--- /dev/null
+++ b/config-model/src/test/cfg/routing/invalidstoragepolicy/services.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <route name="foo" hops="[Storage:cluster=storage;slobroks=donald.duck.example.com:14020"/>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/mismatchedrecipient/errors.txt b/config-model/src/test/cfg/routing/mismatchedrecipient/errors.txt
new file mode 100755
index 00000000000..7be10cc0c6f
--- /dev/null
+++ b/config-model/src/test/cfg/routing/mismatchedrecipient/errors.txt
@@ -0,0 +1 @@
+Selector 'bar/[baz]/cox' does not match recipient 'cox/0/bar' in hop 'foo' in routing table 'document'.
diff --git a/config-model/src/test/cfg/routing/mismatchedrecipient/hosts.xml b/config-model/src/test/cfg/routing/mismatchedrecipient/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/mismatchedrecipient/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/mismatchedrecipient/services.xml b/config-model/src/test/cfg/routing/mismatchedrecipient/services.xml
new file mode 100644
index 00000000000..32a4c99066e
--- /dev/null
+++ b/config-model/src/test/cfg/routing/mismatchedrecipient/services.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="foo" selector="bar/[baz]/cox">
+ <recipient session="cox/0/bar" />
+ </hop>
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/replacehop/documentrouteselectorpolicy.cfg b/config-model/src/test/cfg/routing/replacehop/documentrouteselectorpolicy.cfg
new file mode 100755
index 00000000000..375e89f7419
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replacehop/documentrouteselectorpolicy.cfg
@@ -0,0 +1,3 @@
+route[0].name "music"
+route[0].selector "(music)"
+route[0].feed ""
diff --git a/config-model/src/test/cfg/routing/replacehop/hosts.xml b/config-model/src/test/cfg/routing/replacehop/hosts.xml
new file mode 100755
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replacehop/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/replacehop/messagebus.cfg b/config-model/src/test/cfg/routing/replacehop/messagebus.cfg
new file mode 100755
index 00000000000..ad8fb260824
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replacehop/messagebus.cfg
@@ -0,0 +1,22 @@
+routingtable[0].protocol "document"
+routingtable[0].hop[0].name "docproc/cluster.music.indexing/chain.indexing"
+routingtable[0].hop[0].selector "[LoadBalancer:cluster=docproc/cluster.music.indexing;session=chain.indexing]"
+routingtable[0].hop[0].ignoreresult false
+routingtable[0].hop[1].name "indexing"
+routingtable[0].hop[1].selector "[DocumentRouteSelector]"
+routingtable[0].hop[1].recipient[0] "music"
+routingtable[0].hop[1].ignoreresult false
+routingtable[0].hop[2].name "search/cluster.music"
+routingtable[0].hop[2].selector "foo"
+routingtable[0].hop[2].ignoreresult false
+routingtable[0].route[0].name "default"
+routingtable[0].route[0].hop[0] "indexing"
+routingtable[0].route[1].name "music"
+routingtable[0].route[1].hop[0] "[MessageType:music]"
+routingtable[0].route[2].name "music-direct"
+routingtable[0].route[2].hop[0] "[Content:cluster=music]"
+routingtable[0].route[3].name "music-index"
+routingtable[0].route[3].hop[0] "docproc/cluster.music.indexing/chain.indexing"
+routingtable[0].route[3].hop[1] "[Content:cluster=music]"
+routingtable[0].route[4].name "storage/cluster.music"
+routingtable[0].route[4].hop[0] "route:music"
diff --git a/config-model/src/test/cfg/routing/replacehop/searchdefinitions/music.sd b/config-model/src/test/cfg/routing/replacehop/searchdefinitions/music.sd
new file mode 100755
index 00000000000..6c6c3e15783
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replacehop/searchdefinitions/music.sd
@@ -0,0 +1,13 @@
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+search music {
+ document music {
+ field f1 type string {
+ indexing: summary | index
+ # index-to: f1, all
+ }
+ field f2 type string {
+ indexing: summary | index
+ # index-to: f2, all
+ }
+ }
+}
diff --git a/config-model/src/test/cfg/routing/replacehop/services.xml b/config-model/src/test/cfg/routing/replacehop/services.xml
new file mode 100755
index 00000000000..1baaf6a9af0
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replacehop/services.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ <logserver hostalias="node1" />
+ <slobroks>
+ <slobrok hostalias="node1" />
+ </slobroks>
+ </admin>
+
+ <content id="music" version="1.0">
+ <redundancy>1</redundancy>
+ <nodes>
+ <node hostalias="node1" distribution-key="0"/>
+ </nodes>
+ <documents>
+ <document type="music" mode="index"/>
+ </documents>
+ </content>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="search/cluster.music" selector="foo" />
+ </routingtable>
+ <services protocol="document">
+ <service name="foo" />
+ </services>
+ </routing>
+
+</services>
diff --git a/config-model/src/test/cfg/routing/replaceroute/documentrouteselectorpolicy.cfg b/config-model/src/test/cfg/routing/replaceroute/documentrouteselectorpolicy.cfg
new file mode 100755
index 00000000000..375e89f7419
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replaceroute/documentrouteselectorpolicy.cfg
@@ -0,0 +1,3 @@
+route[0].name "music"
+route[0].selector "(music)"
+route[0].feed ""
diff --git a/config-model/src/test/cfg/routing/replaceroute/hosts.xml b/config-model/src/test/cfg/routing/replaceroute/hosts.xml
new file mode 100755
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replaceroute/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/replaceroute/messagebus.cfg b/config-model/src/test/cfg/routing/replaceroute/messagebus.cfg
new file mode 100755
index 00000000000..e9389a2a6d9
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replaceroute/messagebus.cfg
@@ -0,0 +1,19 @@
+routingtable[0].protocol "document"
+routingtable[0].hop[0].name "docproc/cluster.music.indexing/chain.indexing"
+routingtable[0].hop[0].selector "[LoadBalancer:cluster=docproc/cluster.music.indexing;session=chain.indexing]"
+routingtable[0].hop[0].ignoreresult false
+routingtable[0].hop[1].name "indexing"
+routingtable[0].hop[1].selector "[DocumentRouteSelector]"
+routingtable[0].hop[1].recipient[0] "music"
+routingtable[0].hop[1].ignoreresult false
+routingtable[0].route[0].name "default"
+routingtable[0].route[0].hop[0] "foo"
+routingtable[0].route[1].name "music"
+routingtable[0].route[1].hop[0] "[MessageType:music]"
+routingtable[0].route[2].name "music-direct"
+routingtable[0].route[2].hop[0] "[Content:cluster=music]"
+routingtable[0].route[3].name "music-index"
+routingtable[0].route[3].hop[0] "docproc/cluster.music.indexing/chain.indexing"
+routingtable[0].route[3].hop[1] "[Content:cluster=music]"
+routingtable[0].route[4].name "storage/cluster.music"
+routingtable[0].route[4].hop[0] "route:music"
diff --git a/config-model/src/test/cfg/routing/replaceroute/searchdefinitions/music.sd b/config-model/src/test/cfg/routing/replaceroute/searchdefinitions/music.sd
new file mode 100755
index 00000000000..6c6c3e15783
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replaceroute/searchdefinitions/music.sd
@@ -0,0 +1,13 @@
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+search music {
+ document music {
+ field f1 type string {
+ indexing: summary | index
+ # index-to: f1, all
+ }
+ field f2 type string {
+ indexing: summary | index
+ # index-to: f2, all
+ }
+ }
+}
diff --git a/config-model/src/test/cfg/routing/replaceroute/services.xml b/config-model/src/test/cfg/routing/replaceroute/services.xml
new file mode 100755
index 00000000000..7c39e37e002
--- /dev/null
+++ b/config-model/src/test/cfg/routing/replaceroute/services.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ <logserver hostalias="node1" />
+ <slobroks>
+ <slobrok hostalias="node1" />
+ </slobroks>
+ </admin>
+ <content version="1.0" id="music">
+ <redundancy>1</redundancy>
+ <nodes>
+ <node hostalias="node1" distribution-key="0"/>
+ </nodes>
+ <documents>
+ <document type="music" mode="index"/>
+ </documents>
+ </content>
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <route name="default" hops="foo" />
+ </routingtable>
+ <services protocol="document">
+ <service name="foo" />
+ </services>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/routeconfig/documentrouteselectorpolicy.cfg b/config-model/src/test/cfg/routing/routeconfig/documentrouteselectorpolicy.cfg
new file mode 100755
index 00000000000..8b137891791
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routeconfig/documentrouteselectorpolicy.cfg
@@ -0,0 +1 @@
+
diff --git a/config-model/src/test/cfg/routing/routeconfig/hosts.xml b/config-model/src/test/cfg/routing/routeconfig/hosts.xml
new file mode 100755
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routeconfig/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/routeconfig/messagebus.cfg b/config-model/src/test/cfg/routing/routeconfig/messagebus.cfg
new file mode 100755
index 00000000000..556cbef7556
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routeconfig/messagebus.cfg
@@ -0,0 +1,7 @@
+routingtable[0].protocol "document"
+routingtable[0].route[0].name "backdoor"
+routingtable[0].route[0].hop[0] "docproc/cluster.music.indexing/*/chain.music.indexing"
+routingtable[0].route[0].hop[1] "backdoor"
+routingtable[0].route[1].name "default"
+routingtable[0].route[1].hop[0] "docproc/cluster.blacklist/*/chain.blacklist"
+routingtable[0].route[1].hop[1] "indexing"
diff --git a/config-model/src/test/cfg/routing/routeconfig/services.xml b/config-model/src/test/cfg/routing/routeconfig/services.xml
new file mode 100755
index 00000000000..bf004ab0cf9
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routeconfig/services.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document" verify="false">
+ <route name="default" hops="docproc/cluster.blacklist/*/chain.blacklist indexing" />
+ <route name="backdoor" hops="docproc/cluster.music.indexing/*/chain.music.indexing backdoor" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/routenotfound/errors.txt b/config-model/src/test/cfg/routing/routenotfound/errors.txt
new file mode 100755
index 00000000000..a2cd1a1a6f1
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routenotfound/errors.txt
@@ -0,0 +1 @@
+Hop 'foo' in routing table 'document' references route 'bar' which does not exist.
diff --git a/config-model/src/test/cfg/routing/routenotfound/hosts.xml b/config-model/src/test/cfg/routing/routenotfound/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routenotfound/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/routenotfound/services.xml b/config-model/src/test/cfg/routing/routenotfound/services.xml
new file mode 100644
index 00000000000..72267cf394d
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routenotfound/services.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="foo" selector="route:bar" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/routenotfoundinroute/errors.txt b/config-model/src/test/cfg/routing/routenotfoundinroute/errors.txt
new file mode 100755
index 00000000000..536e82a09b1
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routenotfoundinroute/errors.txt
@@ -0,0 +1 @@
+Hop 1 in route 'foo' in routing table 'document' references route 'bar' which does not exist.
diff --git a/config-model/src/test/cfg/routing/routenotfoundinroute/hosts.xml b/config-model/src/test/cfg/routing/routenotfoundinroute/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routenotfoundinroute/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/routenotfoundinroute/services.xml b/config-model/src/test/cfg/routing/routenotfoundinroute/services.xml
new file mode 100644
index 00000000000..0083d36933f
--- /dev/null
+++ b/config-model/src/test/cfg/routing/routenotfoundinroute/services.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <route name="foo" hops="route:bar" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/servicenotfound/errors.txt b/config-model/src/test/cfg/routing/servicenotfound/errors.txt
new file mode 100755
index 00000000000..430cd317a90
--- /dev/null
+++ b/config-model/src/test/cfg/routing/servicenotfound/errors.txt
@@ -0,0 +1 @@
+Hop 'foo' in routing table 'document' references 'bar/baz' which is neither a service, a route nor another hop.
diff --git a/config-model/src/test/cfg/routing/servicenotfound/hosts.xml b/config-model/src/test/cfg/routing/servicenotfound/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/servicenotfound/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/servicenotfound/services.xml b/config-model/src/test/cfg/routing/servicenotfound/services.xml
new file mode 100644
index 00000000000..9f3822eb89d
--- /dev/null
+++ b/config-model/src/test/cfg/routing/servicenotfound/services.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ <logserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="foo" selector="bar/baz" />
+ </routingtable>
+ </routing>
+</services>
diff --git a/config-model/src/test/cfg/routing/unexpectedrecipient/errors.txt b/config-model/src/test/cfg/routing/unexpectedrecipient/errors.txt
new file mode 100755
index 00000000000..3972c29adcf
--- /dev/null
+++ b/config-model/src/test/cfg/routing/unexpectedrecipient/errors.txt
@@ -0,0 +1 @@
+Hop 'foo' in routing table 'document' has recipients but no policy directive.
diff --git a/config-model/src/test/cfg/routing/unexpectedrecipient/hosts.xml b/config-model/src/test/cfg/routing/unexpectedrecipient/hosts.xml
new file mode 100644
index 00000000000..e2b97e374e6
--- /dev/null
+++ b/config-model/src/test/cfg/routing/unexpectedrecipient/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="localhost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-model/src/test/cfg/routing/unexpectedrecipient/services.xml b/config-model/src/test/cfg/routing/unexpectedrecipient/services.xml
new file mode 100644
index 00000000000..aa0ac5c896a
--- /dev/null
+++ b/config-model/src/test/cfg/routing/unexpectedrecipient/services.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services>
+ <admin version="2.0">
+ <adminserver hostalias="node1" />
+ <logserver hostalias="node1" />
+ </admin>
+
+ <routing version="1.0">
+ <routingtable protocol="document">
+ <hop name="foo" selector="bar">
+ <recipient session="baz" />
+ </hop>
+ </routingtable>
+ <services protocol="document">
+ <service name="bar" />
+ <service name="baz" />
+ </services>
+ </routing>
+</services>