aboutsummaryrefslogtreecommitdiffstats
path: root/config-application-package/src/test/resources
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-application-package/src/test/resources
Publish
Diffstat (limited to 'config-application-package/src/test/resources')
-rw-r--r--config-application-package/src/test/resources/app-with-deployment/deployment.xml9
-rw-r--r--config-application-package/src/test/resources/app-with-deployment/hosts.xml10
-rw-r--r--config-application-package/src/test/resources/app-with-deployment/searchdefinitions/music.sd8
-rw-r--r--config-application-package/src/test/resources/app-with-deployment/services.xml12
-rw-r--r--config-application-package/src/test/resources/defdircomponent/com.yahoo.searcher1.jarbin0 -> 8413 bytes
-rw-r--r--config-application-package/src/test/resources/multienvapp/content/content_foo.xml6
-rw-r--r--config-application-package/src/test/resources/multienvapp/content/content_nodes.xml13
-rw-r--r--config-application-package/src/test/resources/multienvapp/hosts.xml10
-rw-r--r--config-application-package/src/test/resources/multienvapp/jdisc.xml17
-rw-r--r--config-application-package/src/test/resources/multienvapp/searchdefinitions/music.sd8
-rw-r--r--config-application-package/src/test/resources/multienvapp/services.xml23
-rw-r--r--config-application-package/src/test/resources/multienvapp_failrequired/services.xml4
12 files changed, 120 insertions, 0 deletions
diff --git a/config-application-package/src/test/resources/app-with-deployment/deployment.xml b/config-application-package/src/test/resources/app-with-deployment/deployment.xml
new file mode 100644
index 00000000000..053e7a485c3
--- /dev/null
+++ b/config-application-package/src/test/resources/app-with-deployment/deployment.xml
@@ -0,0 +1,9 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<deployment version='1.0'>
+ <test />
+ <staging />
+ <prod>
+ <region active="true">us-east</region>
+ <region active="false">us-west-1</region>
+ </prod>
+</deployment>
diff --git a/config-application-package/src/test/resources/app-with-deployment/hosts.xml b/config-application-package/src/test/resources/app-with-deployment/hosts.xml
new file mode 100644
index 00000000000..a9116028e2b
--- /dev/null
+++ b/config-application-package/src/test/resources/app-with-deployment/hosts.xml
@@ -0,0 +1,10 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts xmlns:deploy="vespa" xmlns:preprocess="properties">
+ <preprocess:properties>
+ <node1.hostname>foo.yahoo.com</node1.hostname>
+ <node1.hostname deploy:environment="dev">bar.yahoo.com</node1.hostname>
+ </preprocess:properties>
+ <host name="${node1.hostname}">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-application-package/src/test/resources/app-with-deployment/searchdefinitions/music.sd b/config-application-package/src/test/resources/app-with-deployment/searchdefinitions/music.sd
new file mode 100644
index 00000000000..2d7217a0542
--- /dev/null
+++ b/config-application-package/src/test/resources/app-with-deployment/searchdefinitions/music.sd
@@ -0,0 +1,8 @@
+# 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 f type string {
+ indexing: index | summary
+ }
+ }
+}
diff --git a/config-application-package/src/test/resources/app-with-deployment/services.xml b/config-application-package/src/test/resources/app-with-deployment/services.xml
new file mode 100644
index 00000000000..52f247d29f0
--- /dev/null
+++ b/config-application-package/src/test/resources/app-with-deployment/services.xml
@@ -0,0 +1,12 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services version='1.0'>
+ <admin version='2.0'>
+ <adminserver hostalias='node0'/>
+ </admin>
+ <content version='1.0' id='foo'>
+ <redundancy>1</redundancy>
+ <documents>
+ <document type="music.sd" mode="index" />
+ </documents>
+ </content>
+</services>
diff --git a/config-application-package/src/test/resources/defdircomponent/com.yahoo.searcher1.jar b/config-application-package/src/test/resources/defdircomponent/com.yahoo.searcher1.jar
new file mode 100644
index 00000000000..437246152db
--- /dev/null
+++ b/config-application-package/src/test/resources/defdircomponent/com.yahoo.searcher1.jar
Binary files differ
diff --git a/config-application-package/src/test/resources/multienvapp/content/content_foo.xml b/config-application-package/src/test/resources/multienvapp/content/content_foo.xml
new file mode 100644
index 00000000000..e7221a0eeff
--- /dev/null
+++ b/config-application-package/src/test/resources/multienvapp/content/content_foo.xml
@@ -0,0 +1,6 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<redundancy>1</redundancy>
+<documents>
+ <document type="music.sd" mode="index" />
+</documents>
+<preprocess:include file="content_nodes.xml" />
diff --git a/config-application-package/src/test/resources/multienvapp/content/content_nodes.xml b/config-application-package/src/test/resources/multienvapp/content/content_nodes.xml
new file mode 100644
index 00000000000..883c2354ea5
--- /dev/null
+++ b/config-application-package/src/test/resources/multienvapp/content/content_nodes.xml
@@ -0,0 +1,13 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<nodes>
+ <node hostalias="node0" distribution-key="0" />
+</nodes>
+<nodes deploy:environment="prod">
+ <node hostalias="node0" distribution-key="0" />
+ <node hostalias="node1" distribution-key="1" />
+</nodes>
+<nodes deploy:environment="prod" deploy:region="us-west">
+ <node hostalias="node0" distribution-key="0" />
+ <node hostalias="node1" distribution-key="1" />
+ <node hostalias="node2" distribution-key="2" />
+</nodes>
diff --git a/config-application-package/src/test/resources/multienvapp/hosts.xml b/config-application-package/src/test/resources/multienvapp/hosts.xml
new file mode 100644
index 00000000000..a9116028e2b
--- /dev/null
+++ b/config-application-package/src/test/resources/multienvapp/hosts.xml
@@ -0,0 +1,10 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts xmlns:deploy="vespa" xmlns:preprocess="properties">
+ <preprocess:properties>
+ <node1.hostname>foo.yahoo.com</node1.hostname>
+ <node1.hostname deploy:environment="dev">bar.yahoo.com</node1.hostname>
+ </preprocess:properties>
+ <host name="${node1.hostname}">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/config-application-package/src/test/resources/multienvapp/jdisc.xml b/config-application-package/src/test/resources/multienvapp/jdisc.xml
new file mode 100644
index 00000000000..7b2486966f7
--- /dev/null
+++ b/config-application-package/src/test/resources/multienvapp/jdisc.xml
@@ -0,0 +1,17 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<jdisc id='stateless' version='1.0'>
+ <search deploy:environment="prod">
+ <chain id="common">
+ <searcher id="MySearcher1" />
+ <searcher deploy:environment="prod" id="MySearcher2" />
+ </chain>
+ </search>
+ <search />
+ <component id="foo" class="MyFoo" bundle="foobundle" />
+ <component id="bar" class="TestBar" bundle="foobundle" deploy:environment="dev" />
+ <component id="bar" class="ProdBar" bundle="foobundle" deploy:environment="prod" />
+ <component id="baz" class="ProdBaz" bundle="foobundle" deploy:environment="prod" />
+ <nodes>
+ <node hostalias='node0' baseport="${qrs.port}"/>
+ </nodes>
+</jdisc>
diff --git a/config-application-package/src/test/resources/multienvapp/searchdefinitions/music.sd b/config-application-package/src/test/resources/multienvapp/searchdefinitions/music.sd
new file mode 100644
index 00000000000..2d7217a0542
--- /dev/null
+++ b/config-application-package/src/test/resources/multienvapp/searchdefinitions/music.sd
@@ -0,0 +1,8 @@
+# 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 f type string {
+ indexing: index | summary
+ }
+ }
+}
diff --git a/config-application-package/src/test/resources/multienvapp/services.xml b/config-application-package/src/test/resources/multienvapp/services.xml
new file mode 100644
index 00000000000..c06e37feabf
--- /dev/null
+++ b/config-application-package/src/test/resources/multienvapp/services.xml
@@ -0,0 +1,23 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services version='1.0' xmlns:deploy="vespa" xmlns:preprocess="properties">
+ <preprocess:properties>
+ <qrs.port>4099</qrs.port>
+ <qrs.port>5000</qrs.port>
+ </preprocess:properties>
+
+ <preprocess:properties deploy:environment='prod'>
+ <qrs.port deploy:region='us-west'>5001</qrs.port>
+ <qrs.port deploy:region='us-east'>5002</qrs.port>
+ </preprocess:properties>
+ <admin version='2.0'>
+ <adminserver hostalias='node0'/>
+ </admin>
+ <admin version='2.0' deploy:environment='prod'>
+ <adminserver hostalias='node1'/>
+ </admin>
+ <preprocess:include file='jdisc.xml'/>
+ <content version='1.0' id='foo'>
+ <preprocess:include file='content/content_foo.xml'/>
+ </content>
+ <preprocess:include file='doesnotexist.xml' required='false' />
+</services>
diff --git a/config-application-package/src/test/resources/multienvapp_failrequired/services.xml b/config-application-package/src/test/resources/multienvapp_failrequired/services.xml
new file mode 100644
index 00000000000..3063fd7eb09
--- /dev/null
+++ b/config-application-package/src/test/resources/multienvapp_failrequired/services.xml
@@ -0,0 +1,4 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services version='1.0' xmlns:deploy="vespa" xmlns:preprocess="properties">
+ <preprocess:include file='doesnotexist.xml' />
+</services>