summaryrefslogtreecommitdiffstats
path: root/config-model/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test')
-rw-r--r--config-model/src/test/schema-test-files/services-bad-vespamalloc.xml13
-rw-r--r--config-model/src/test/schema-test-files/services-hosted.xml4
-rwxr-xr-xconfig-model/src/test/sh/test-schema.sh7
3 files changed, 22 insertions, 2 deletions
diff --git a/config-model/src/test/schema-test-files/services-bad-vespamalloc.xml b/config-model/src/test/schema-test-files/services-bad-vespamalloc.xml
new file mode 100644
index 00000000000..9245d976128
--- /dev/null
+++ b/config-model/src/test/schema-test-files/services-bad-vespamalloc.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services version="1.0">
+
+ <content id="foo" version="1.0">
+ <redundancy>2</redundancy>
+ <documents>
+ <document type='bar' mode="index"/>
+ </documents>
+ <nodes count="1" no-vespamalloc="`curl something`"/>
+ </content>
+
+</services>
diff --git a/config-model/src/test/schema-test-files/services-hosted.xml b/config-model/src/test/schema-test-files/services-hosted.xml
index 8ce35f5efbd..2fbb0bc979b 100644
--- a/config-model/src/test/schema-test-files/services-hosted.xml
+++ b/config-model/src/test/schema-test-files/services-hosted.xml
@@ -22,14 +22,14 @@
<content id="search" version="1.0">
<redundancy>2</redundancy>
- <nodes count="7" flavor="large" groups="12">
+ <nodes count="7" flavor="large" groups="12" no-vespamalloc="proton distributord">
<resources vcpu="3.0" memory="32000.0Mb" disk="300 Gb"/>
</nodes>
</content>
<content id="ml" version="1.0">
<redundancy>2</redundancy>
- <nodes count="[10,20]" flavor="large" groups="[1,3]">
+ <nodes count="[10,20]" flavor="large" groups="[1,3]" vespamalloc-debug-stacktrace="proton">
<resources vcpu="[3.0, 4]" memory="[32000.0Mb, 33Gb]" disk="[300 Gb, 1Tb]"/>
</nodes>
</content>
diff --git a/config-model/src/test/sh/test-schema.sh b/config-model/src/test/sh/test-schema.sh
index 11e592d1bce..efee3087ebe 100755
--- a/config-model/src/test/sh/test-schema.sh
+++ b/config-model/src/test/sh/test-schema.sh
@@ -32,3 +32,10 @@ $cmd
cmd="java -jar $jar target/generated-sources/trang/resources/schema/validation-overrides.rng src/test/schema-test-files/validation-overrides.xml"
echo $cmd
$cmd
+
+cmd="java -jar $jar target/generated-sources/trang/resources/schema/services.rng src/test/schema-test-files/services-bad-vespamalloc.xml"
+echo $cmd
+if $cmd; then
+ echo 'invalid attribute not detected'
+ exit 1
+fi