[TEST] rename local index so that the name is the same as the remote one

This way we make sure that index names are disambiguated.
This commit is contained in:
javanna 2016-12-02 01:02:37 +01:00 committed by Luca Cavanna
parent bd816f02ee
commit f9eaee3c9c
1 changed files with 9 additions and 12 deletions

View File

@ -3,7 +3,7 @@
- do:
indices.create:
index: test_index_1
index: test_index
body:
settings:
index:
@ -13,26 +13,26 @@
bulk:
refresh: true
body:
- '{"index": {"_index": "test_index_1", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"f1": "local_cluster", "filter_field": 0}'
- '{"index": {"_index": "test_index_1", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"f1": "local_cluster", "filter_field": 1}'
- '{"index": {"_index": "test_index_1", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"f1": "local_cluster", "filter_field": 0}'
- '{"index": {"_index": "test_index_1", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"f1": "local_cluster", "filter_field": 1}'
- '{"index": {"_index": "test_index_1", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"f1": "local_cluster", "filter_field": 0}'
- do:
search:
index: test_index_1,my_remote_cluster|test_index
index: test_index,my_remote_cluster|test_index
- match: { hits.total: 10 }
- do:
search:
index: test_index_1,my_remote_cluster|test_index
index: test_index,my_remote_cluster|test_index
body:
query:
term:
@ -50,7 +50,7 @@
- do:
search:
index: test_index_1
index: test_index
- match: { hits.total: 5}
@ -89,6 +89,3 @@
- match: { hits.total: 2 }
- match: { hits.hits.0._source.filter_field: 1 }
- match: { hits.hits.0._index: "my_remote_cluster|test_index" }