[Server] Feat: Add comprehensive HTTP inspector tests with improved framework (#125)

* feat: add comprehensive HTTP inspector tests and improve test framework

* chore: remove debug flag from server configuration
This commit is contained in:
Kyrian Obikwelu 2025-10-30 17:47:53 +01:00 • committed by GitHub
commit 757b959bfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 1877 additions and 189 deletions

View file

@ -0,0 +1,3 @@
{
"prompts": []
}

View file

@ -0,0 +1,3 @@
{
"resources": []
}

View file

@ -0,0 +1,3 @@
{
"resourceTemplates": []
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "8"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "-3"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "5"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "3.5"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "24"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "0"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "256"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "1"
}
],
"isError": false
}

View file

@ -0,0 +1,76 @@
{
"tools": [
{
"name": "add_numbers",
"inputSchema": {
"type": "object",
"properties": {
"a": {
"type": "integer"
},
"b": {
"type": "integer"
}
},
"required": [
"a",
"b"
]
}
},
{
"name": "multiply_numbers",
"inputSchema": {
"type": "object",
"properties": {
"a": {
"type": "integer"
},
"b": {
"type": "integer"
}
},
"required": [
"a",
"b"
]
}
},
{
"name": "divide_numbers",
"inputSchema": {
"type": "object",
"properties": {
"a": {
"type": "integer"
},
"b": {
"type": "integer"
}
},
"required": [
"a",
"b"
]
}
},
{
"name": "power",
"inputSchema": {
"type": "object",
"properties": {
"base": {
"type": "integer"
},
"exponent": {
"type": "integer"
}
},
"required": [
"base",
"exponent"
]
}
}
]
}

View file

@ -0,0 +1,3 @@
{
"prompts": []
}

View file

@ -0,0 +1,10 @@
{
"resources": [
{
"name": "system_stats",
"uri": "stats://system/overview",
"description": "Provides current system statistics.",
"mimeType": "application/json"
}
]
}

View file

@ -0,0 +1,9 @@
{
"contents": [
{
"uri": "stats://system/overview",
"mimeType": "application/json",
"text": "{\n \"total_tasks\": 3,\n \"completed_tasks\": 0,\n \"pending_tasks\": 3,\n \"server_uptime_seconds\": 12345\n}"
}
]
}

View file

@ -0,0 +1,3 @@
{
"resourceTemplates": []
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "{\n \"id\": 4,\n \"userId\": \"alice\",\n \"description\": \"Complete the project documentation\",\n \"completed\": false,\n \"createdAt\": \"2025-01-01T00:00:00+00:00\"\n}"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "{\n \"success\": true,\n \"message\": \"Task 1 completed.\"\n}"
}
],
"isError": false
}

View file

@ -0,0 +1,9 @@
{
"content": [
{
"type": "text",
"text": "[]"
}
],
"isError": false
}

View file

@ -0,0 +1,57 @@
{
"tools": [
{
"name": "add_task",
"description": "Adds a new task for a given user.",
"inputSchema": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"description": "the ID of the user"
},
"description": {
"type": "string",
"description": "the task description"
}
},
"required": [
"userId",
"description"
]
}
},
{
"name": "list_user_tasks",
"description": "Lists pending tasks for a specific user.",
"inputSchema": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"description": "the ID of the user"
}
},
"required": [
"userId"
]
}
},
{
"name": "complete_task",
"description": "Marks a task as complete.",
"inputSchema": {
"type": "object",
"properties": {
"taskId": {
"type": "integer",
"description": "the ID of the task to complete"
}
},
"required": [
"taskId"
]
}
}
]
}

Some files were not shown because too many files have changed in this diff Show more