Skip to content

Commit

Permalink
Allowing reroute processor yaml rest tests to work with indices or da…
Browse files Browse the repository at this point in the history
…ta streams (elastic#100463)
  • Loading branch information
masseyke authored Oct 9, 2023
1 parent 6d639c6 commit b92a2ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion modules/ingest-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {

restResources {
restApi {
include '_common', 'ingest', 'cluster', 'indices', 'index', 'bulk', 'nodes', 'get', 'update', 'cat', 'mget'
include '_common', 'ingest', 'cluster', 'indices', 'index', 'bulk', 'nodes', 'get', 'update', 'cat', 'mget', 'search'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,22 @@ teardown:
- do:
index:
index: logs-generic-default
refresh: true
op_type: create
id: "1"
pipeline: "pipeline-with-two-data-stream-processors"
body: {
foo: "bar"
}

- do:
get:
search:
index: logs-first-default
id: "1"
- match: { _source.foo: "bar" }
body:
query:
match: {"_id": "1"}
- match: { hits.hits.0._source.foo: "bar" }

---
"Test two stage routing":
- skip:
Expand Down Expand Up @@ -110,21 +115,13 @@ teardown:
]
}
- match: { acknowledged: true }
- do:
allowed_warnings:
- "index template [logs-nginx] has index patterns [logs-nginx-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [logs-nginx] will take precedence during new index creation"
indices.put_index_template:
name: logs-nginx
body:
index_patterns: [ "logs-nginx-*" ]
template:
settings:
index.default_pipeline: "logs-nginx"

- do:
index:
refresh: true
index: logs-nginx-default
id: "example-log"
pipeline: "logs-nginx"
op_type: create
body:
"@timestamp": "2022-04-13"
Expand All @@ -134,7 +131,9 @@ teardown:
path: "nginx-error.log"

- do:
get:
search:
index: logs-nginx.error-default
id: "example-log"
- match: { _source.message: "this is an error log" }
body:
query:
match: {"_id": "example-log"}
- match: { hits.hits.0._source.message: "this is an error log" }

0 comments on commit b92a2ac

Please sign in to comment.