fix integ tests

This commit is contained in:
Robert Muir 2015-12-09 00:30:13 -05:00
parent 46d73a13ff
commit a6e1655fe9
7 changed files with 58 additions and 56 deletions

View File

@ -12,3 +12,60 @@
- match: { nodes.$master.modules.0.name: lang-mustache }
- match: { nodes.$master.modules.0.jvm: true }
---
"Indexed template":
- do:
put_template:
id: "1"
body: { "template": { "query": { "match_all": {}}, "size": "{{my_size}}" } }
- match: { _id: "1" }
- do:
get_template:
id: 1
- match: { found: true }
- match: { lang: mustache }
- match: { _id: "1" }
- match: { _version: 1 }
- match: { template: /.*query\S\S\S\Smatch_all.*/ }
- do:
catch: missing
get_template:
id: 2
- match: { found: false }
- match: { lang: mustache }
- match: { _id: "2" }
- is_false: _version
- is_false: template
- do:
delete_template:
id: "1"
- match: { found: true }
- match: { _index: ".scripts" }
- match: { _id: "1" }
- match: { _version: 2}
- do:
catch: missing
delete_template:
id: "non_existing"
- match: { found: false }
- match: { _index: ".scripts" }
- match: { _id: "non_existing" }
- match: { _version: 1 }
- do:
catch: request
put_template:
id: "1"
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }
- do:
catch: /Unable\sto\sparse.*/
put_template:
id: "1"
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }

View File

@ -51,3 +51,4 @@
- query:
{ "template": { "query": { "term": { "foo": { "value": "{{template}}" } } }, "params": { "template": "bar" } } }
- match: { responses.0.hits.total: 1 }

View File

@ -1,56 +0,0 @@
---
"Indexed template":
- do:
put_template:
id: "1"
body: { "template": { "query": { "match_all": {}}, "size": "{{my_size}}" } }
- match: { _id: "1" }
- do:
get_template:
id: 1
- match: { found: true }
- match: { lang: mustache }
- match: { _id: "1" }
- match: { _version: 1 }
- match: { template: /.*query\S\S\S\Smatch_all.*/ }
- do:
catch: missing
get_template:
id: 2
- match: { found: false }
- match: { lang: mustache }
- match: { _id: "2" }
- is_false: _version
- is_false: template
- do:
delete_template:
id: "1"
- match: { found: true }
- match: { _index: ".scripts" }
- match: { _id: "1" }
- match: { _version: 2}
- do:
catch: missing
delete_template:
id: "non_existing"
- match: { found: false }
- match: { _index: ".scripts" }
- match: { _id: "non_existing" }
- match: { _version: 1 }
- do:
catch: request
put_template:
id: "1"
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }
- do:
catch: /Unable\sto\sparse.*/
put_template:
id: "1"
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }