aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/cfg
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-02-15 11:48:40 +0100
committerBjørn Christian Seime <bjorncs@yahoo-inc.com>2017-02-16 10:44:50 +0100
commit8b1d8d0caa31d0e29ca64decc2ae5996e4473994 (patch)
tree04642049de96f52041eac76bc199b6ff782c551a /config-model/src/test/cfg
parent2ff3a6724f645b224a004530abc59854b05c7ccc (diff)
Validate that searchable copies matches redundancy
Verify that the number of searchable copies is the same as effective redundancy. Rewrite GlobalDistributionValidatorTest to not use Mockito. Add end-to-end test to verify that the GlobalDistributionValidator is wired into the overall model validation.
Diffstat (limited to 'config-model/src/test/cfg')
-rw-r--r--config-model/src/test/cfg/application/validation/global_distribution_validation/hosts.xml7
-rw-r--r--config-model/src/test/cfg/application/validation/global_distribution_validation/searchdefinitions/parent.sd5
-rw-r--r--config-model/src/test/cfg/application/validation/global_distribution_validation/searchdefinitions/simple.sd6
-rw-r--r--config-model/src/test/cfg/application/validation/global_distribution_validation/services.xml18
4 files changed, 36 insertions, 0 deletions
diff --git a/config-model/src/test/cfg/application/validation/global_distribution_validation/hosts.xml b/config-model/src/test/cfg/application/validation/global_distribution_validation/hosts.xml
new file mode 100644
index 00000000000..c8cbda0509d
--- /dev/null
+++ b/config-model/src/test/cfg/application/validation/global_distribution_validation/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2017 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/application/validation/global_distribution_validation/searchdefinitions/parent.sd b/config-model/src/test/cfg/application/validation/global_distribution_validation/searchdefinitions/parent.sd
new file mode 100644
index 00000000000..a772cc87710
--- /dev/null
+++ b/config-model/src/test/cfg/application/validation/global_distribution_validation/searchdefinitions/parent.sd
@@ -0,0 +1,5 @@
+# Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+search parent {
+ document parent {
+ }
+}
diff --git a/config-model/src/test/cfg/application/validation/global_distribution_validation/searchdefinitions/simple.sd b/config-model/src/test/cfg/application/validation/global_distribution_validation/searchdefinitions/simple.sd
new file mode 100644
index 00000000000..49572be1cae
--- /dev/null
+++ b/config-model/src/test/cfg/application/validation/global_distribution_validation/searchdefinitions/simple.sd
@@ -0,0 +1,6 @@
+# Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+search simple {
+ document simple {
+ field my_reference type reference<parent> { indexing: summary }
+ }
+}
diff --git a/config-model/src/test/cfg/application/validation/global_distribution_validation/services.xml b/config-model/src/test/cfg/application/validation/global_distribution_validation/services.xml
new file mode 100644
index 00000000000..df3a3e8f3d7
--- /dev/null
+++ b/config-model/src/test/cfg/application/validation/global_distribution_validation/services.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2017 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>
+ <content version="1.0">
+ <redundancy>1</redundancy>
+ <documents>
+ <document type='simple' mode="index"/>
+ <document type='parent' mode="index"/>
+ </documents>
+ <nodes>
+ <node hostalias='node1' distribution-key='0'/>
+ </nodes>
+ </content>
+</services>