Skip to content

Commit

Permalink
Scriptfield test: set number of shards to 1 (elastic#80026) (elastic#…
Browse files Browse the repository at this point in the history
…80032)

The 20_scriptfield:"Scripted Field with error accessing an
unsupported field via the script fields api" test expects to fail because
the field is not yet supported in the fields API.

However, if the number of shards in the target index is randomly more
than one, the empty shard will succeed leading to a 200 response rather
than the expected 400 response.

This change forces the number of shards to 1 to avoid this scenario.

Fixes: elastic#79986
Backport: 9511c54
  • Loading branch information
stu-elastic authored Oct 28, 2021
1 parent f165cab commit 28d0446
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ setup:
indices.create:
index: test
body:
settings:
number_of_shards: "1"
mappings:
properties:
foo:
Expand Down

0 comments on commit 28d0446

Please sign in to comment.