summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/cfg
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2019-12-02 08:27:16 +0100
committerJon Marius Venstad <venstad@gmail.com>2019-12-02 08:27:16 +0100
commitb127005594b314a5fa5ffddcd458de80ca240eef (patch)
tree27aba5a8f5e3744a1d5942583c5412b263c905d8 /config-model/src/test/cfg
parente346de03f3ff1b37e9b7ce94399492fdebcd5ac6 (diff)
Revert "Revert "Jvenstad/test steps in deployment spec""
This reverts commit 12fcbd278a5fadb085456f0cde9059755c0fe231.
Diffstat (limited to 'config-model/src/test/cfg')
-rw-r--r--config-model/src/test/cfg/application/app_complicated_deployment_spec/deployment.xml48
-rw-r--r--config-model/src/test/cfg/application/app_complicated_deployment_spec/hosts.xml21
-rw-r--r--config-model/src/test/cfg/application/app_complicated_deployment_spec/searchdefinitions/music.sd37
-rw-r--r--config-model/src/test/cfg/application/app_complicated_deployment_spec/services.xml59
-rw-r--r--config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml4
5 files changed, 166 insertions, 3 deletions
diff --git a/config-model/src/test/cfg/application/app_complicated_deployment_spec/deployment.xml b/config-model/src/test/cfg/application/app_complicated_deployment_spec/deployment.xml
new file mode 100644
index 00000000000..36c1d449021
--- /dev/null
+++ b/config-model/src/test/cfg/application/app_complicated_deployment_spec/deployment.xml
@@ -0,0 +1,48 @@
+<deployment version='1.0' athenz-domain='domain'>
+ <staging />
+ <parallel>
+ <instance id='instance' athenz-service='in-service'>
+ <prod>
+ <parallel>
+ <region active='true'>us-west-1</region>
+ <steps>
+ <region active='true'>us-east-3</region>
+ <delay hours='2' />
+ <region active='true'>eu-west-1</region>
+ <delay hours='2' />
+ </steps>
+ <steps>
+ <delay hours='3' />
+ <region active='true'>aws-us-east-1a</region>
+ <parallel>
+ <region active='true' athenz-service='no-service'>ap-northeast-1</region>
+ <region active='true'>ap-southeast-2</region>
+ </parallel>
+ </steps>
+ <delay hours='3' minutes='30' />
+ </parallel>
+ <region active='true'>us-north-7</region>
+ </prod>
+ </instance>
+ <instance id='other'>
+ <upgrade policy='conservative' />
+ <block-change days='sat' hours='10' time-zone='CET' />
+ <test />
+ <prod>
+ <region active='true'>eu-central-2</region>
+ </prod>
+ <notifications when='failing'>
+ <email role='author' />
+ <email address='john@dev' when='failing-commit' />
+ <email address='jane@dev' />
+ </notifications>
+ <endpoints>
+ <endpoint id='foo' container-id='bar'>
+ <region>us-east</region>
+ </endpoint>
+ <endpoint id='nalle' container-id='frosk' />
+ <endpoint container-id='quux' />
+ </endpoints>
+ </instance>
+ </parallel>
+</deployment>
diff --git a/config-model/src/test/cfg/application/app_complicated_deployment_spec/hosts.xml b/config-model/src/test/cfg/application/app_complicated_deployment_spec/hosts.xml
new file mode 100644
index 00000000000..a7fc725d377
--- /dev/null
+++ b/config-model/src/test/cfg/application/app_complicated_deployment_spec/hosts.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="bogusname1">
+ <alias>node1</alias>
+ </host>
+ <host name="bogusname2">
+ <alias>node2</alias>
+ </host>
+ <host name="bogusname3">
+ <alias>node3</alias>
+ </host>
+ <host name="bogusname4">
+ <alias>node4</alias>
+ </host>
+ <host name="bogusname5">
+ <alias>node5</alias>
+ </host>
+
+</hosts>
+
diff --git a/config-model/src/test/cfg/application/app_complicated_deployment_spec/searchdefinitions/music.sd b/config-model/src/test/cfg/application/app_complicated_deployment_spec/searchdefinitions/music.sd
new file mode 100644
index 00000000000..693afbd308d
--- /dev/null
+++ b/config-model/src/test/cfg/application/app_complicated_deployment_spec/searchdefinitions/music.sd
@@ -0,0 +1,37 @@
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+# A basic search definition - called music, should be saved to music.sd
+search music {
+
+ # It contains one document type only - called music as well
+ document music {
+
+ field title type string {
+ indexing: summary | index # How this field should be indexed
+ # index-to: title, default # Create two indexes
+ rank-type: about # Type of ranking settings to apply
+ }
+
+ field artist type string {
+ indexing: summary | attribute | index
+ # index-to: artist, default
+ rank-type:about
+ }
+
+ field year type int {
+ indexing: summary | attribute
+ }
+
+ # Increase rank score of popular documents regardless of query
+ field popularity type int {
+ indexing: summary | attribute
+ }
+
+ field url type uri {
+ indexing: summary | index
+ }
+
+ field cover type raw {}
+
+ }
+
+}
diff --git a/config-model/src/test/cfg/application/app_complicated_deployment_spec/services.xml b/config-model/src/test/cfg/application/app_complicated_deployment_spec/services.xml
new file mode 100644
index 00000000000..9ae7f122e81
--- /dev/null
+++ b/config-model/src/test/cfg/application/app_complicated_deployment_spec/services.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services version="1.0">
+
+ <service version="1.0" name="myservice" command="mycmd1.sh">
+ <config name="a.myconfig">
+ <mysetting>bar</mysetting>
+ </config>
+ <node hostalias="node1">
+ <config name="a.myconfig">
+ <mysetting>baz</mysetting>
+ </config>
+ </node>
+ <node hostalias="node2"/>
+ <node hostalias="node3"/>
+ <node hostalias="node3"/>
+ </service>
+
+ <service version="1.0" name="myotherservice" command="/home/vespa/bin/mycmd2.sh --ytest $FOO_BAR">
+ <config name="a.myconfig">
+ <mysetting>bar2</mysetting>
+ </config>
+ <node hostalias="node3">
+ <config name="a.myconfig">
+ <mysetting>baz2</mysetting>
+ </config>
+ </node>
+ <node hostalias="node4"/>
+ <node hostalias="node5"/>
+ </service>
+
+ <admin version="2.0">
+ <adminserver hostalias="node1"/>
+ <slobroks>
+ <slobrok hostalias="node1"/>
+ <slobrok hostalias="node2"/>
+ </slobroks>
+ </admin>
+
+ <container version="1.0">
+ <nodes>
+ <node hostalias="node1" />
+ </nodes>
+
+ <search/>
+ <document-api/>
+ </container>
+
+ <content id="music" version="1.0">
+ <redundancy>1</redundancy>
+ <documents>
+ <document type="music" mode="index" />
+ </documents>
+ <nodes>
+ <node hostalias="node1" distribution-key="0" />
+ </nodes>
+ </content>
+
+</services>
diff --git a/config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml b/config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml
index 2f6e9b7a1a6..8e13f0abb53 100644
--- a/config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml
+++ b/config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml
@@ -4,9 +4,7 @@
<staging/>
<prod global-service-id="query">
<parallel>
- <region active="true">us-east-3</region>
- <delay hours="1"/>
- <region active="true">us-west-1</region>
+ <instance id="hello" />
</parallel>
</prod>
</deployment>