Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for /_template/{name}. #736

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions tests/default/_core/template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test templates.
epilogues:
- path: /_template/daily_logs
method: DELETE
status: [200, 404]
chapters:
- synopsis: Create a template.
path: /_template/{name}
method: POST
parameters:
name: daily_logs
request:
payload:
index_patterns:
- 'logs*'
settings:
number_of_shards: 2
number_of_replicas: 2
response:
status: 200
- synopsis: Update a template.
path: /_template/{name}
method: PUT
parameters:
name: daily_logs
request:
payload:
index_patterns:
- 'logs*'
aliases:
my_logs: {}
settings:
number_of_shards: 4
number_of_replicas: 4
mappings:
properties:
timestamp:
type: date
format: yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis
value:
type: double
response:
status: 200
- synopsis: Retrieve templates.
path: /_template
method: GET
- synopsis: Retrieve a template.
path: /_template/{name}
method: GET
parameters:
name: daily_logs
response:
status: 200
payload:
daily_logs:
index_patterns:
- logs*
settings:
index:
number_of_shards: '4'
number_of_replicas: '4'
- synopsis: Check that a template exists.
path: /_template/{name}
method: HEAD
parameters:
name: daily_logs
- synopsis: Delete a template.
path: /_template/{name}
method: DELETE
parameters:
name: daily_logs
Loading