Skip to content

Commit ef3f592

Browse files
committed
Fix E2E, add config swap for no-MCP-servers tests
Assisted-by: Claude Opus 4.6 Generated-by: Cursor Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>
1 parent 5881a33 commit ef3f592

5 files changed

Lines changed: 58 additions & 2 deletions

File tree

docs/openapi.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5363,7 +5363,7 @@
53635363
],
53645364
"summary": "Handle A2A Jsonrpc",
53655365
"description": "Handle A2A JSON-RPC requests following the A2A protocol specification.\n\nThis endpoint uses the DefaultRequestHandler from the A2A SDK to handle\nall JSON-RPC requests including message/send, message/stream, etc.\n\nThe A2A SDK application is created per-request to include authentication\ncontext while still leveraging FastAPI's authorization middleware.\n\nAutomatically detects streaming requests (message/stream JSON-RPC method)\nand returns a StreamingResponse to enable real-time chunk delivery.\n\nArgs:\n request: FastAPI request object\n auth: Authentication tuple\n mcp_headers: MCP headers for context propagation\n\nReturns:\n JSON-RPC response or streaming response",
5366-
"operationId": "handle_a2a_jsonrpc_a2a_post",
5366+
"operationId": "handle_a2a_jsonrpc_a2a_get",
53675367
"responses": {
53685368
"200": {
53695369
"description": "Successful Response",
@@ -5381,7 +5381,7 @@
53815381
],
53825382
"summary": "Handle A2A Jsonrpc",
53835383
"description": "Handle A2A JSON-RPC requests following the A2A protocol specification.\n\nThis endpoint uses the DefaultRequestHandler from the A2A SDK to handle\nall JSON-RPC requests including message/send, message/stream, etc.\n\nThe A2A SDK application is created per-request to include authentication\ncontext while still leveraging FastAPI's authorization middleware.\n\nAutomatically detects streaming requests (message/stream JSON-RPC method)\nand returns a StreamingResponse to enable real-time chunk delivery.\n\nArgs:\n request: FastAPI request object\n auth: Authentication tuple\n mcp_headers: MCP headers for context propagation\n\nReturns:\n JSON-RPC response or streaming response",
5384-
"operationId": "handle_a2a_jsonrpc_a2a_post",
5384+
"operationId": "handle_a2a_jsonrpc_a2a_get",
53855385
"responses": {
53865386
"200": {
53875387
"description": "Successful Response",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Lightspeed Core Service (LCS)
2+
service:
3+
host: 0.0.0.0
4+
port: 8080
5+
auth_enabled: false
6+
workers: 1
7+
color_log: true
8+
access_log: true
9+
llama_stack:
10+
# Library mode - embeds llama-stack as library
11+
use_as_library_client: true
12+
library_client_config_path: run.yaml
13+
user_data_collection:
14+
feedback_enabled: true
15+
feedback_storage: "/tmp/data/feedback"
16+
transcripts_enabled: true
17+
transcripts_storage: "/tmp/data/transcripts"
18+
authentication:
19+
module: "noop"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Lightspeed Core Service (LCS)
2+
service:
3+
host: 0.0.0.0
4+
port: 8080
5+
auth_enabled: false
6+
workers: 1
7+
color_log: true
8+
access_log: true
9+
llama_stack:
10+
# Server mode - connects to separate llama-stack service
11+
use_as_library_client: false
12+
url: http://llama-stack:8321
13+
api_key: xyzzy
14+
user_data_collection:
15+
feedback_enabled: true
16+
feedback_storage: "/tmp/data/feedback"
17+
transcripts_enabled: true
18+
transcripts_storage: "/tmp/data/transcripts"
19+
authentication:
20+
module: "noop"

tests/e2e/features/environment.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@
8080
"tests/e2e/configuration/{mode_dir}/lightspeed-stack-mcp-auth.yaml",
8181
"tests/e2e-prow/rhoai/configs/lightspeed-stack-mcp-auth.yaml",
8282
),
83+
"no-mcp": (
84+
"tests/e2e/configuration/{mode_dir}/lightspeed-stack-no-mcp.yaml",
85+
"tests/e2e-prow/rhoai/configs/lightspeed-stack-no-mcp.yaml",
86+
),
8387
}
8488

8589

@@ -451,6 +455,13 @@ def before_feature(context: Context, feature: Feature) -> None:
451455
switch_config(context.feature_config)
452456
restart_container("lightspeed-stack")
453457

458+
if "MCPNoConfig" in feature.tags:
459+
context.feature_config = _get_config_path("no-mcp", mode_dir)
460+
context.default_config_backup = create_config_backup("lightspeed-stack.yaml")
461+
switch_config(context.feature_config)
462+
restart_container("lightspeed-stack")
463+
464+
454465
def after_feature(context: Context, feature: Feature) -> None:
455466
"""Run after each feature file is exercised.
456467
@@ -492,3 +503,8 @@ def after_feature(context: Context, feature: Feature) -> None:
492503
switch_config(context.default_config_backup)
493504
restart_container("lightspeed-stack")
494505
remove_config_backup(context.default_config_backup)
506+
507+
if "MCPNoConfig" in feature.tags:
508+
switch_config(context.default_config_backup)
509+
restart_container("lightspeed-stack")
510+
remove_config_backup(context.default_config_backup)

tests/e2e/features/mcp_servers_api_no_config.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@MCPNoConfig
12
Feature: MCP Server API tests without configured MCP servers
23

34
Tests that the MCP server management endpoints work correctly

0 commit comments

Comments
 (0)