Skip to content

Commit

Permalink
[TEST] illegal_argument_exception when downsampling all indexes in …
Browse files Browse the repository at this point in the history
…serverless (elastic#99630)

Downsampling wildcard and _all indexes raises different errors in
stateful (security disabled) vs serverless (security enabled):

Stateful:

```
[{type=index_not_found_exception, reason=no such index [test*], index_uuid=_na_, index=test*, stack_trace=[test*] org.elasticsearch.index.IndexNotFoundException: no such index [test*]\n\tat org.elasticsearch.xpack.downsample.TransportDownsampleAction.masterOperation(TransportDownsampleAction.java:205)
```

Serverless:

```
[{type=illegal_argument_exception, reason=the action indices:admin/xpack/downsample does not support wildcards; the provided index expression(s) [test*] are not allowed, stack_trace=org.elasticsearch.ElasticsearchException$1: the action indices:admin/xpack/downsample does not support wildcards; the provided index expression(s) [test*] are not allowed
```
  • Loading branch information
kkrik-es authored Sep 19, 2023
1 parent 4fdfb33 commit f685bdc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,10 @@ setup:
body:
index.blocks.write: true

# The following two tests may return different exceptions, depending on whether security is enabled (serverless)
# or not (stateful).
- do:
catch: /index_not_found_exception/
catch: /index_not_found_exception|illegal_argument_exception/
indices.downsample:
index: test*
target_index: test-downsample
Expand All @@ -455,7 +457,7 @@ setup:
}
- do:
catch: /index_not_found_exception/
catch: /index_not_found_exception|illegal_argument_exception/
indices.downsample:
index: _all
target_index: test-downsample
Expand Down

0 comments on commit f685bdc

Please sign in to comment.