Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into role-mapping-post
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokesh authored Dec 18, 2024
2 parents 4bec8d6 + 1b6935f commit 054935d
Show file tree
Hide file tree
Showing 26 changed files with 228 additions and 119 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
tests: routing
- version: 2.18.0
tests: snapshot
- version: 2.18.0
tests: remote_store
- version: 2.18.0
tests: dangling
url: http://localhost:9200
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added support for using a certificate and key in tests ([#731](https://github.com/opensearch-project/opensearch-api-specification/pull/731))
- Added `_type` to `termvector` and `mtermvector` ([#734](https://github.com/opensearch-project/opensearch-api-specification/pull/734))
- Added missing `cancelled` and `resource_stats` to `/_reindex/{task_id}/_rethrottle` ([#740](https://github.com/opensearch-project/opensearch-api-specification/pull/740))
- Added missing `cancellation_time_millis` to `POST /_tasks/_cancel` ([#747](https://github.com/opensearch-project/opensearch-api-specification/pull/747))

### Removed
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))
Expand Down
2 changes: 2 additions & 0 deletions spec/schemas/tasks._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ components:
type: boolean
cancellable:
type: boolean
cancellation_time_millis:
$ref: '_common.yaml#/components/schemas/EpochTimeUnitMillis'
description:
type: string
headers:
Expand Down
2 changes: 1 addition & 1 deletion tests/default/_core/mget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ prologues:
content_type: application/x-ndjson
payload:
- {create: {_index: books, _id: book1}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 60}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- {create: {_index: movies, _id: movie1}}
- {director: Bennett Miller, title: The Cruise, year: 1998}
- {create: {_index: movies, _id: movie2}}
Expand Down
2 changes: 1 addition & 1 deletion tests/default/_core/msearch/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ prologues:
content_type: application/x-ndjson
payload:
- {create: {_index: books, _id: book1}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 60}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- {create: {_index: movies, _id: movie1}}
- {director: Bennett Miller, title: The Cruise, year: 1998}
- {create: {_index: movies, _id: movie2}}
Expand Down
2 changes: 1 addition & 1 deletion tests/default/_core/reindex/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ prologues:
request:
payload:
title: Beauty and the Beast
year: 91
year: 1991
status: [201]
chapters:
- synopsis: Transform documents using a pipeline.
Expand Down
25 changes: 25 additions & 0 deletions tests/default/_core/stats.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test stats.
chapters:
- synopsis: Get global stats.
path: /_stats
method: GET
response:
status: 200
- synopsis: Get global stats with human fields.
path: /_stats
method: GET
parameters:
human: true
response:
status: 200
- synopsis: Get stats for a given metric.
path: /_stats/{metric}
method: GET
parameters:
metric: docs
expand_wildcards: all
forbid_closed_indices: false
groups: '*'
level: indices
39 changes: 39 additions & 0 deletions tests/default/_core/tasks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test tasks endpoint.
prologues:
- path: /books/_delete_by_query
id: task
method: POST
parameters:
refresh: true
conflicts: proceed
wait_for_completion: false
request:
payload:
query:
match_all: {}
output:
id: payload.task
chapters:
- synopsis: List tasks grouped by node.
path: /_tasks
method: GET
parameters:
group_by: nodes
- synopsis: List tasks grouped by parent.
path: /_tasks
method: GET
parameters:
group_by: parents
- synopsis: List tasks grouped by none.
path: /_tasks
method: GET
parameters:
group_by: none
- synopsis: Get task by id.
id: task
path: /_tasks/{task_id}
method: GET
parameters:
task_id: ${task.id}
39 changes: 39 additions & 0 deletions tests/default/_core/tasks/cancel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test tasks endpoint.
epilogues:
- path: /books
method: DELETE
status: [200, 404]
prologues:
- path: /_bulk
method: POST
parameters:
refresh: true
request:
content_type: application/x-ndjson
payload:
- {create: {_index: books}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- path: /books/_delete_by_query
id: task
method: POST
parameters:
refresh: true
conflicts: proceed
wait_for_completion: false
request:
payload:
query:
match_all: {}
output:
id: payload.task
chapters:
- synopsis: Cancel all tasks.
path: /_tasks/_cancel
method: POST
- synopsis: Cancel a task.
path: /_tasks/{task_id}/_cancel
method: POST
parameters:
task_id: ${task.id}
2 changes: 1 addition & 1 deletion tests/default/cat/pending_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ prologues:
request:
payload:
title: Beauty and the Beast
year: 91
year: 1991
status: [201]
- path: /_reindex
method: POST
Expand Down
2 changes: 1 addition & 1 deletion tests/default/cluster/pending_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ prologues:
request:
payload:
title: Beauty and the Beast
year: 91
year: 1991
status: [201]
- path: /_reindex
method: POST
Expand Down
4 changes: 2 additions & 2 deletions tests/default/indices/delete_by_query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ prologues:
content_type: application/x-ndjson
payload:
- {create: {_index: books, _id: book_1392214}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 60}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- {create: {_index: books, _id: book_1392215}}
- {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 91}
- {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 1991}
chapters:
- synopsis: Delete documents in the index (full query term, script).
path: /{index}/_delete_by_query
Expand Down
4 changes: 2 additions & 2 deletions tests/default/indices/delete_by_query/rethrottle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ prologues:
content_type: application/x-ndjson
payload:
- {create: {_index: books, _id: book_1392214}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 60}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- {create: {_index: books, _id: book_1392215}}
- {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 91}
- {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 1991}
- path: /books/_delete_by_query
id: task
method: POST
Expand Down
2 changes: 1 addition & 1 deletion tests/default/indices/msearch/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prologues:
content_type: application/x-ndjson
payload:
- {create: {_index: books, _id: book1}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 60}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- {create: {_index: books, _id: book2}}
- {director: Bennett Miller, title: The Cruise, year: 1998}
- {create: {_index: books, _id: book3}}
Expand Down
12 changes: 0 additions & 12 deletions tests/default/indices/stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ epilogues:
method: DELETE
status: [200, 404]
chapters:
- synopsis: Get global stats.
path: /_stats
method: GET
response:
status: 200
- synopsis: Get global stats with human fields.
path: /_stats
method: GET
parameters:
human: true
response:
status: 200
- synopsis: Get stats for an index.
path: /{index}/_stats
method: GET
Expand Down
25 changes: 0 additions & 25 deletions tests/default/tasks/list.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion tests/default/transforms/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prologues:
request:
payload:
title: Beauty and the Beast
year: 91
year: 1991
status: [201]
epilogues:
- path: /movies
Expand Down
2 changes: 1 addition & 1 deletion tests/default/transforms/transform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prologues:
request:
payload:
title: Beauty and the Beast
year: 91
year: 1991
status: [201]
epilogues:
- path: /_plugins/_transform/movies-to-films
Expand Down
2 changes: 1 addition & 1 deletion tests/default/transforms/transform/explain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prologues:
request:
payload:
title: Beauty and the Beast
year: 91
year: 1991
status: [201]
- path: /_plugins/_transform/movies-to-films
method: PUT
Expand Down
2 changes: 1 addition & 1 deletion tests/default/transforms/transform/start.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prologues:
request:
payload:
title: Beauty and the Beast
year: 91
year: 1991
status: [201]
- path: /_plugins/_transform/movies-to-films
method: PUT
Expand Down
2 changes: 1 addition & 1 deletion tests/default/transforms/transform/stop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prologues:
request:
payload:
title: Beauty and the Beast
year: 91
year: 1991
status: [201]
- path: /_plugins/_transform/movies-to-films
method: PUT
Expand Down
15 changes: 15 additions & 0 deletions tests/plugins/security/_core/settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test settings.
chapters:
- synopsis: Update cluster settings.
path: /_settings
method: PUT
request:
payload:
settings:
index:
number_of_replicas: 4
- synopsis: Get settings.
path: /_settings
method: GET
67 changes: 0 additions & 67 deletions tests/plugins/workload-management/query_group.yaml

This file was deleted.

Loading

0 comments on commit 054935d

Please sign in to comment.