Skip to content

Commit

Permalink
Reindex: Fold "with all deps" project into reindex (#30154)
Browse files Browse the repository at this point in the history
This folds the `:qa:smoke-test-reindex-with-all-modules` project into
`:modules:reindex` by declaring the reindex's integration testing
cluster requires the `parent-join` and `lang-painless` plugins and then
moving all of the integration tests that depended on parent-join and
painless into reindex.

It saves us one cluster start up during the build at the cost of a
little of the reindex module's "purity". Since the reindex module *does*
have unit tests that test scripting without painless I'm fairly ok with
that.
  • Loading branch information
nik9000 committed May 10, 2018
1 parent a6233b9 commit 47db1d6
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 173 deletions.
6 changes: 6 additions & 0 deletions modules/reindex/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ esplugin {
}

integTestCluster {
// Modules who's integration is explicitly tested in integration tests
module project(':modules:parent-join')
module project(':modules:lang-painless')
// Whitelist reindexing from the local node so we can test reindex-from-remote.
setting 'reindex.remote.whitelist', '127.0.0.1:*'
}

run {
// Modules who's integration is explicitly tested in integration tests
module project(':modules:parent-join')
module project(':modules:lang-painless')
// Whitelist reindexing from the local node so we can test reindex-from-remote.
setting 'reindex.remote.whitelist', '127.0.0.1:*'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"Response format search failures":
"Response format for search failures":
- do:
index:
index: source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,3 +433,28 @@
- match: { docs.2._index: index2 }
- match: { docs.2._type: type2 }
- match: { docs.2._id: fr_789 }

---
"Totally broken scripts report the error properly":
- do:
index:
index: twitter
type: tweet
id: 1
body: { "user": "kimchy" }
- do:
indices.refresh: {}

- do:
catch: request
reindex:
refresh: true
body:
source:
index: twitter
dest:
index: new_twitter
script:
lang: painless
source: syntax errors are fun!
- match: {error.reason: 'compile error'}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"Response format search failures":
"Response format for search failures":
- do:
index:
index: source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,25 @@
term:
level: 11
- match: { hits.total: 0 }

---
"Totally broken scripts report the error properly":
- do:
index:
index: twitter
type: tweet
id: 1
body: { "user": "kimchy" }
- do:
indices.refresh: {}

- do:
catch: request
update_by_query:
index: twitter
refresh: true
body:
script:
lang: painless
source: syntax errors are fun!
- match: {error.reason: 'compile error'}
26 changes: 0 additions & 26 deletions qa/smoke-test-reindex-with-all-modules/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 47db1d6

Please sign in to comment.