kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
pull/715/head
rodzic
1769f761ce
commit
a687f41b03
|
@ -11,6 +11,39 @@ exports[`MCP => MCP origin basic "add" tool call success > 9.0: @dev/test-basic-
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`MCP => MCP origin basic "echo" tool > 10.0: @dev/test-basic-mcp/mcp echo 1`] = `
|
||||||
|
{
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"text": "{"nala":"kitten","num":123,"now":1749678633338}",
|
||||||
|
"type": "text",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`MCP => MCP origin basic "pure" tool > 11.0: @dev/test-basic-mcp/mcp echo 1`] = `
|
||||||
|
{
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"text": "{"nala":"kitten","foo":"bar"}",
|
||||||
|
"type": "text",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`MCP => MCP origin basic "pure" tool > 11.1: @dev/test-basic-mcp/mcp echo 1`] = `
|
||||||
|
{
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"text": "{"nala":"kitten","foo":"bar"}",
|
||||||
|
"type": "text",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`MCP => OpenAPI origin basic @ 010332cf get_post success > 2.0: @dev/test-basic-openapi@010332cf/mcp get_post 1`] = `
|
exports[`MCP => OpenAPI origin basic @ 010332cf get_post success > 2.0: @dev/test-basic-openapi@010332cf/mcp get_post 1`] = `
|
||||||
{
|
{
|
||||||
"content": [],
|
"content": [],
|
||||||
|
|
|
@ -453,7 +453,7 @@ export const fixtureSuites: E2ETestFixtureSuite[] = [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'HTTP => MCP origin basic "echo" tool call success',
|
title: 'HTTP => MCP origin basic "echo" tool',
|
||||||
snapshot: false,
|
snapshot: false,
|
||||||
fixtures: [
|
fixtures: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -384,5 +384,98 @@ export const fixtureSuites: MCPE2ETestFixtureSuite[] = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'MCP => MCP origin basic "echo" tool',
|
||||||
|
path: '@dev/test-basic-mcp/mcp',
|
||||||
|
fixtures: [
|
||||||
|
{
|
||||||
|
request: {
|
||||||
|
name: 'echo',
|
||||||
|
args: {
|
||||||
|
nala: 'kitten',
|
||||||
|
num: 123,
|
||||||
|
now
|
||||||
|
}
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
isError: false,
|
||||||
|
content: [
|
||||||
|
{
|
||||||
|
type: 'text',
|
||||||
|
text: JSON.stringify({ nala: 'kitten', num: 123, now })
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'MCP => MCP origin basic "pure" tool',
|
||||||
|
path: '@dev/test-basic-mcp/mcp',
|
||||||
|
fixtures: [
|
||||||
|
{
|
||||||
|
request: {
|
||||||
|
name: 'echo',
|
||||||
|
args: {
|
||||||
|
nala: 'kitten',
|
||||||
|
foo: 'bar'
|
||||||
|
},
|
||||||
|
_meta: {
|
||||||
|
agentic: {
|
||||||
|
headers: {
|
||||||
|
'cache-control':
|
||||||
|
'public, max-age=31560000, s-maxage=31560000, stale-while-revalidate=3600'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
isError: false,
|
||||||
|
content: [
|
||||||
|
{
|
||||||
|
type: 'text',
|
||||||
|
text: JSON.stringify({
|
||||||
|
nala: 'kitten',
|
||||||
|
foo: 'bar'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// second request should hit the cache
|
||||||
|
request: {
|
||||||
|
name: 'echo',
|
||||||
|
args: {
|
||||||
|
nala: 'kitten',
|
||||||
|
foo: 'bar'
|
||||||
|
},
|
||||||
|
_meta: {
|
||||||
|
agentic: {
|
||||||
|
headers: {
|
||||||
|
'cache-control':
|
||||||
|
'public, max-age=31560000, s-maxage=31560000, stale-while-revalidate=3600'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
isError: false,
|
||||||
|
content: [
|
||||||
|
{
|
||||||
|
type: 'text',
|
||||||
|
text: JSON.stringify({
|
||||||
|
nala: 'kitten',
|
||||||
|
foo: 'bar'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
],
|
||||||
|
_agenticMeta: {
|
||||||
|
cacheStatus: 'HIT'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Ładowanie…
Reference in New Issue