Remove leftover file template references

Original commit: elastic/x-pack-elasticsearch@04e98c6261
This commit is contained in:
Ryan Ernst 2017-05-17 23:22:27 -07:00
parent 7052194094
commit d475010d1b
2 changed files with 4 additions and 114 deletions

View File

@ -24,14 +24,6 @@ setup:
"roles" : [ "stored_template_role" ] "roles" : [ "stored_template_role" ]
} }
- do:
xpack.security.put_user:
username: "file_template_user"
body: >
{
"password": "changeme",
"roles" : [ "file_template_role" ]
}
- do: - do:
xpack.security.put_user: xpack.security.put_user:
username: "terms_template_user" username: "terms_template_user"
@ -40,7 +32,7 @@ setup:
"password": "changeme", "password": "changeme",
"roles" : [ "terms_template_role" ], "roles" : [ "terms_template_role" ],
"metadata": { "metadata": {
"groups": [ "inline_template_user", "file_template_user" ] "groups": [ "inline_template_user"]
} }
} }
@ -100,24 +92,6 @@ setup:
] ]
} }
- do:
xpack.security.put_role:
name: "file_template_role"
body: >
{
"indices": [
{
"names": "foobar",
"privileges": ["all"],
"query" : {
"template" : {
"id" : "query"
}
}
}
]
}
- do: - do:
put_template: put_template:
id: "1" id: "1"
@ -146,15 +120,6 @@ setup:
{ {
"username": "stored_template_user" "username": "stored_template_user"
} }
- do:
index:
index: foobar
type: type
id: 3
body: >
{
"username": "file_template_user"
}
- do: - do:
indices.refresh: {} indices.refresh: {}
@ -169,10 +134,6 @@ teardown:
xpack.security.delete_user: xpack.security.delete_user:
username: "stored_template_user" username: "stored_template_user"
ignore: 404 ignore: 404
- do:
xpack.security.delete_user:
username: "file_template_user"
ignore: 404
- do: - do:
xpack.security.delete_user: xpack.security.delete_user:
username: "terms_template_user" username: "terms_template_user"
@ -185,10 +146,6 @@ teardown:
xpack.security.delete_role: xpack.security.delete_role:
name: "stored_template_role" name: "stored_template_role"
ignore: 404 ignore: 404
- do:
xpack.security.delete_role:
name: "file_template_role"
ignore: 404
- do: - do:
xpack.security.delete_role: xpack.security.delete_role:
name: "terms_template_role" name: "terms_template_role"
@ -215,17 +172,6 @@ teardown:
- match: { hits.total: 1} - match: { hits.total: 1}
- match: { hits.hits.0._source.username: stored_template_user} - match: { hits.hits.0._source.username: stored_template_user}
---
"Test file template":
- do:
headers:
Authorization: "Basic ZmlsZV90ZW1wbGF0ZV91c2VyOmNoYW5nZW1l"
search:
index: foobar
body: { "query" : { "match_all" : {} } }
- match: { hits.total: 1}
- match: { hits.hits.0._source.username: file_template_user}
--- ---
"Test terms template": "Test terms template":
- do: - do:
@ -234,6 +180,5 @@ teardown:
search: search:
index: foobar index: foobar
body: { "query" : { "match_all" : {} } } body: { "query" : { "match_all" : {} } }
- match: { hits.total: 2} - match: { hits.total: 1}
- match: { hits.hits.0._source.username: inline_template_user} - match: { hits.hits.0._source.username: inline_template_user}
- match: { hits.hits.1._source.username: file_template_user}

View File

@ -24,14 +24,6 @@ setup:
"roles" : [ "stored_template_role" ] "roles" : [ "stored_template_role" ]
} }
- do:
xpack.security.put_user:
username: "file_template_user"
body: >
{
"password": "changeme",
"roles" : [ "file_template_role" ]
}
- do: - do:
xpack.security.put_user: xpack.security.put_user:
username: "terms_template_user" username: "terms_template_user"
@ -40,7 +32,7 @@ setup:
"password": "changeme", "password": "changeme",
"roles" : [ "terms_template_role" ], "roles" : [ "terms_template_role" ],
"metadata": { "metadata": {
"groups": [ "inline_template_user", "file_template_user" ] "groups": [ "inline_template_user" ]
} }
} }
@ -100,24 +92,6 @@ setup:
] ]
} }
- do:
xpack.security.put_role:
name: "file_template_role"
body: >
{
"indices": [
{
"names": "foobar",
"privileges": ["all"],
"query" : {
"template" : {
"id" : "query"
}
}
}
]
}
- do: - do:
put_template: put_template:
id: "1" id: "1"
@ -146,15 +120,6 @@ setup:
{ {
"username": "stored_template_user" "username": "stored_template_user"
} }
- do:
index:
index: foobar
type: type
id: 3
body: >
{
"username": "file_template_user"
}
- do: - do:
indices.refresh: {} indices.refresh: {}
@ -169,10 +134,6 @@ teardown:
xpack.security.delete_user: xpack.security.delete_user:
username: "stored_template_user" username: "stored_template_user"
ignore: 404 ignore: 404
- do:
xpack.security.delete_user:
username: "file_template_user"
ignore: 404
- do: - do:
xpack.security.delete_user: xpack.security.delete_user:
username: "terms_template_user" username: "terms_template_user"
@ -185,10 +146,6 @@ teardown:
xpack.security.delete_role: xpack.security.delete_role:
name: "stored_template_role" name: "stored_template_role"
ignore: 404 ignore: 404
- do:
xpack.security.delete_role:
name: "file_template_role"
ignore: 404
- do: - do:
xpack.security.delete_role: xpack.security.delete_role:
name: "terms_template_role" name: "terms_template_role"
@ -215,17 +172,6 @@ teardown:
- match: { hits.total: 1} - match: { hits.total: 1}
- match: { hits.hits.0._source.username: stored_template_user} - match: { hits.hits.0._source.username: stored_template_user}
---
"Test file template with run as":
- do:
headers:
es-security-runas-user: "file_template_user"
search:
index: foobar
body: { "query" : { "match_all" : {} } }
- match: { hits.total: 1}
- match: { hits.hits.0._source.username: file_template_user}
--- ---
"Test terms template with run as": "Test terms template with run as":
- do: - do:
@ -234,6 +180,5 @@ teardown:
search: search:
index: foobar index: foobar
body: { "query" : { "match_all" : {} } } body: { "query" : { "match_all" : {} } }
- match: { hits.total: 2} - match: { hits.total: 1}
- match: { hits.hits.0._source.username: inline_template_user} - match: { hits.hits.0._source.username: inline_template_user}
- match: { hits.hits.1._source.username: file_template_user}