Wave 6: Integration tests, golden tests, index invariant tests, diff command (bd-rex, bd-2gp, bd-1ck)
This commit is contained in:
72
tests/fixtures/golden/list.json
vendored
Normal file
72
tests/fixtures/golden/list.json
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"data": {
|
||||
"applied_filters": {},
|
||||
"endpoints": [
|
||||
{
|
||||
"deprecated": false,
|
||||
"method": "GET",
|
||||
"operation_id": "listPets",
|
||||
"path": "/pets",
|
||||
"summary": "List all pets",
|
||||
"tags": [
|
||||
"pets"
|
||||
]
|
||||
},
|
||||
{
|
||||
"deprecated": false,
|
||||
"method": "POST",
|
||||
"operation_id": "createPet",
|
||||
"path": "/pets",
|
||||
"summary": "Create a pet",
|
||||
"tags": [
|
||||
"pets"
|
||||
]
|
||||
},
|
||||
{
|
||||
"deprecated": false,
|
||||
"method": "GET",
|
||||
"operation_id": "showPetById",
|
||||
"path": "/pets/{petId}",
|
||||
"summary": "Get a pet by ID",
|
||||
"tags": [
|
||||
"pets"
|
||||
]
|
||||
},
|
||||
{
|
||||
"deprecated": true,
|
||||
"method": "DELETE",
|
||||
"operation_id": "deletePet",
|
||||
"path": "/pets/{petId}",
|
||||
"summary": "Delete a pet",
|
||||
"tags": [
|
||||
"pets"
|
||||
]
|
||||
},
|
||||
{
|
||||
"deprecated": false,
|
||||
"method": "GET",
|
||||
"operation_id": "getInventory",
|
||||
"path": "/store/inventory",
|
||||
"summary": "Get store inventory",
|
||||
"tags": [
|
||||
"store"
|
||||
]
|
||||
}
|
||||
],
|
||||
"filtered": 5,
|
||||
"meta": {
|
||||
"alias": "petstore",
|
||||
"cached_at": "MASKED_TIMESTAMP",
|
||||
"duration_ms": 0,
|
||||
"spec_version": "1.0.0"
|
||||
},
|
||||
"total": 5
|
||||
},
|
||||
"meta": {
|
||||
"command": "list",
|
||||
"duration_ms": 0,
|
||||
"schema_version": 1,
|
||||
"tool_version": "MASKED"
|
||||
},
|
||||
"ok": true
|
||||
}
|
||||
23
tests/fixtures/golden/schemas_list.json
vendored
Normal file
23
tests/fixtures/golden/schemas_list.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"data": {
|
||||
"schemas": [
|
||||
{
|
||||
"name": "Error"
|
||||
},
|
||||
{
|
||||
"name": "NewPet"
|
||||
},
|
||||
{
|
||||
"name": "Pet"
|
||||
}
|
||||
],
|
||||
"total": 3
|
||||
},
|
||||
"meta": {
|
||||
"command": "schemas",
|
||||
"duration_ms": 0,
|
||||
"schema_version": 1,
|
||||
"tool_version": "MASKED"
|
||||
},
|
||||
"ok": true
|
||||
}
|
||||
31
tests/fixtures/golden/schemas_show.json
vendored
Normal file
31
tests/fixtures/golden/schemas_show.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"data": {
|
||||
"name": "Pet",
|
||||
"schema": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"name"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"command": "schemas",
|
||||
"duration_ms": 0,
|
||||
"schema_version": 1,
|
||||
"tool_version": "MASKED"
|
||||
},
|
||||
"ok": true
|
||||
}
|
||||
110
tests/fixtures/golden/search.json
vendored
Normal file
110
tests/fixtures/golden/search.json
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"data": {
|
||||
"results": [
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"field": "path",
|
||||
"snippet": "/pets"
|
||||
},
|
||||
{
|
||||
"field": "summary",
|
||||
"snippet": "List all pets"
|
||||
}
|
||||
],
|
||||
"method": "GET",
|
||||
"name": "/pets",
|
||||
"rank": 1,
|
||||
"score": 3000,
|
||||
"summary": "List all pets",
|
||||
"type": "endpoint"
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"field": "path",
|
||||
"snippet": "/pets"
|
||||
},
|
||||
{
|
||||
"field": "summary",
|
||||
"snippet": "Create a pet"
|
||||
}
|
||||
],
|
||||
"method": "POST",
|
||||
"name": "/pets",
|
||||
"rank": 2,
|
||||
"score": 3000,
|
||||
"summary": "Create a pet",
|
||||
"type": "endpoint"
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"field": "path",
|
||||
"snippet": "/pets/{petId}"
|
||||
},
|
||||
{
|
||||
"field": "summary",
|
||||
"snippet": "Get a pet by ID"
|
||||
}
|
||||
],
|
||||
"method": "GET",
|
||||
"name": "/pets/{petId}",
|
||||
"rank": 3,
|
||||
"score": 3000,
|
||||
"summary": "Get a pet by ID",
|
||||
"type": "endpoint"
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"field": "path",
|
||||
"snippet": "/pets/{petId}"
|
||||
},
|
||||
{
|
||||
"field": "summary",
|
||||
"snippet": "Delete a pet"
|
||||
}
|
||||
],
|
||||
"method": "DELETE",
|
||||
"name": "/pets/{petId}",
|
||||
"rank": 4,
|
||||
"score": 3000,
|
||||
"summary": "Delete a pet",
|
||||
"type": "endpoint"
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"field": "schema_name",
|
||||
"snippet": "NewPet"
|
||||
}
|
||||
],
|
||||
"name": "NewPet",
|
||||
"rank": 5,
|
||||
"score": 1600,
|
||||
"type": "schema"
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"field": "schema_name",
|
||||
"snippet": "Pet"
|
||||
}
|
||||
],
|
||||
"name": "Pet",
|
||||
"rank": 6,
|
||||
"score": 1600,
|
||||
"type": "schema"
|
||||
}
|
||||
],
|
||||
"total": 6
|
||||
},
|
||||
"meta": {
|
||||
"command": "search",
|
||||
"duration_ms": 0,
|
||||
"schema_version": 1,
|
||||
"tool_version": "MASKED"
|
||||
},
|
||||
"ok": true
|
||||
}
|
||||
51
tests/fixtures/golden/show.json
vendored
Normal file
51
tests/fixtures/golden/show.json
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"data": {
|
||||
"deprecated": false,
|
||||
"description": null,
|
||||
"method": "GET",
|
||||
"operation_id": "listPets",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Maximum number of items to return",
|
||||
"in": "query",
|
||||
"name": "limit",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"description": "Pagination offset",
|
||||
"in": "query",
|
||||
"name": "offset",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"path": "/pets",
|
||||
"request_body": null,
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Pet"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "A list of pets"
|
||||
}
|
||||
},
|
||||
"security": [],
|
||||
"summary": "List all pets",
|
||||
"tags": [
|
||||
"pets"
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"command": "show",
|
||||
"duration_ms": 0,
|
||||
"schema_version": 1,
|
||||
"tool_version": "MASKED"
|
||||
},
|
||||
"ok": true
|
||||
}
|
||||
24
tests/fixtures/golden/tags.json
vendored
Normal file
24
tests/fixtures/golden/tags.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"data": {
|
||||
"tags": [
|
||||
{
|
||||
"description": "Pet operations",
|
||||
"endpoint_count": 4,
|
||||
"name": "pets"
|
||||
},
|
||||
{
|
||||
"description": "Store operations",
|
||||
"endpoint_count": 1,
|
||||
"name": "store"
|
||||
}
|
||||
],
|
||||
"total": 2
|
||||
},
|
||||
"meta": {
|
||||
"command": "tags",
|
||||
"duration_ms": 0,
|
||||
"schema_version": 1,
|
||||
"tool_version": "MASKED"
|
||||
},
|
||||
"ok": true
|
||||
}
|
||||
Reference in New Issue
Block a user