Skip to content

Commit

Permalink
Added missing observability object tests.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Dec 9, 2024
1 parent 87847db commit fc43391
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion spec/namespaces/observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ components:
observability.get_localstats@200:
description: Retrieves
content:
application/json:
text/plain:
schema:
type: string
parameters:
Expand Down
11 changes: 11 additions & 0 deletions tests/default/observability/local/stats.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test backend stats.

chapters:
- synopsis: Get observability stats.
path: /_plugins/_observability/_local/stats
method: GET
response:
status: 200
content_type: text/plain
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ $schema: ../../../json_schemas/test_story.schema.yaml

description: Test various operations of the OpenSearch Observability Object API.

prologues:
- path: /_plugins/_observability/object/{object_id}
method: DELETE
parameters:
object_id: test_object
status: [200, 404]
- path: /_plugins/_observability/object
chapters:
- synopsis: Create an observability object.
path: /_plugins/_observability/object
method: POST
request:
payload:
Expand Down Expand Up @@ -56,12 +52,11 @@ prologues:
tokens:
- name: field1
type: text
status: [200]
- path: /_refresh
method: POST
status: [200]
chapters:
- synopsis: Retrieve specific Observability object after creation.
warnings:
multiple-paths-detected: false
- synopsis: Retrieve an observability object.
path: /_plugins/_observability/object/{object_id}
id: observatory_object
method: GET
Expand All @@ -74,7 +69,7 @@ chapters:
totalHits: 1
totalHitRelation: eq
observabilityObjectList: []
- synopsis: Update specific Observability object.
- synopsis: Update an observability object.
path: /_plugins/_observability/object/{object_id}
method: PUT
parameters:
Expand Down Expand Up @@ -128,19 +123,7 @@ chapters:
status: 200
payload:
objectId: test_object
- synopsis: Retrieve specific Observability object after update.
path: /_plugins/_observability/object/{object_id}
method: GET
parameters:
object_id: test_object
response:
status: 200
payload:
startIndex: 0
totalHits: 1
totalHitRelation: eq
observabilityObjectList: []
- synopsis: Retrieve list of Observability objects.
- synopsis: Retrieve all observability objects.
path: /_plugins/_observability/object
method: GET
response:
Expand All @@ -150,6 +133,11 @@ chapters:
totalHits: 1
totalHitRelation: eq
observabilityObjectList: []
- synopsis: Delete an observability object.
path: /_plugins/_observability/object/{object_id}
method: DELETE
parameters:
object_id: test_object
epilogues:
- path: /_plugins/_observability/object/{object_id}
method: DELETE
Expand Down

0 comments on commit fc43391

Please sign in to comment.