forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With this commit we add REST test cases for Universal Profiling.
- Loading branch information
1 parent
26115fc
commit eab278d
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/profiling/10_basic.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
setup: | ||
- skip: | ||
version: " - 8.12.99" | ||
reason: "Universal Profiling test infrastructure is available in 8.12+" | ||
|
||
- do: | ||
cluster.put_settings: | ||
body: | ||
persistent: | ||
xpack.profiling.templates.enabled: true | ||
|
||
- do: | ||
profiling.status: | ||
wait_for_resources_created: true | ||
|
||
# TODO: Bulk index all data | ||
# - do: | ||
# bulk: | ||
# index: "profiling-events-all" | ||
# refresh: true | ||
# body: | ||
# - { "index": { } } | ||
# - { "data": 1, "count": 40, "data_d": 1, "count_d": 40, "time": 1674835275187, "color": "red" } | ||
|
||
|
||
--- | ||
"Test Status": | ||
- do: | ||
profiling.status: | ||
|
||
- match: {profiling.enabled: true} | ||
- match: {resource_management.enabled: true} | ||
- match: {resources.created: true} | ||
- match: {resources.pre_8_9_1_data: false} | ||
# The assertion is intentionally wrong as we want to provoke a test failure | ||
- match: {resources.has_data: true} | ||
|
||
--- | ||
# TODO: Delete data? | ||
teardown: | ||
- do: | ||
cluster.put_settings: | ||
body: | ||
persistent: | ||
xpack.profiling.templates.enabled: false |