Skip to content

Commit d3f497c

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 1aac7b4 commit d3f497c

4 files changed

Lines changed: 55 additions & 0 deletions

File tree

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: 15 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,12 @@ 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+
454464

455465
def after_feature(context: Context, feature: Feature) -> None:
456466
"""Run after each feature file is exercised.
@@ -493,3 +503,8 @@ def after_feature(context: Context, feature: Feature) -> None:
493503
switch_config(context.default_config_backup)
494504
restart_container("lightspeed-stack")
495505
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)