Skip to content

Commit fc35079

Browse files
committed
fixed library e2e
1 parent eac43da commit fc35079

9 files changed

Lines changed: 16 additions & 14 deletions

docker-compose-library.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ services:
3838
- ./run.yaml:/app-root/run.yaml:Z
3939
- ${GCP_KEYS_PATH:-./tmp/.gcp-keys-dummy}:/opt/app-root/.gcp-keys:ro
4040
- ./tests/e2e/rag:/opt/app-root/src/.llama/storage/rag:Z
41+
- ./tests/e2e/secrets/mcp-token:/tmp/mcp-token:ro
42+
- ./tests/e2e/secrets/invalid-mcp-token:/tmp/invalid-mcp-token:ro
4143
environment:
4244
# LLM Provider API Keys
4345
- BRAVE_SEARCH_API_KEY=${BRAVE_SEARCH_API_KEY:-}

docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ services:
8181
- "8080:8080"
8282
volumes:
8383
- ./lightspeed-stack.yaml:/app-root/lightspeed-stack.yaml:z
84-
- ./tests/e2e/secrets/mcp-token:/tmp/mcp-secret-token:ro
85-
- ./tests/e2e/secrets/invalid-mcp-token:/tmp/invalid-mcp-secret-token:ro
84+
- ./tests/e2e/secrets/mcp-token:/tmp/mcp-token:ro
85+
- ./tests/e2e/secrets/invalid-mcp-token:/tmp/invalid-mcp-token:ro
8686
environment:
8787
- OPENAI_API_KEY=${OPENAI_API_KEY}
8888
# Azure Entra ID credentials (AZURE_API_KEY is obtained dynamically)

tests/e2e/configuration/library-mode/lightspeed-stack-invalid-mcp-file-auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ mcp_servers:
2121
- name: "mcp-file"
2222
url: "http://mock-mcp:3001"
2323
authorization_headers:
24-
Authorization: "/tmp/invalid-mcp-secret-token"
24+
Authorization: "/tmp/invalid-mcp-token"

tests/e2e/configuration/library-mode/lightspeed-stack-mcp-file-auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ mcp_servers:
2121
- name: "mcp-file"
2222
url: "http://mock-mcp:3001"
2323
authorization_headers:
24-
Authorization: "/tmp/mcp-secret-token"
24+
Authorization: "/tmp/mcp-token"

tests/e2e/configuration/library-mode/lightspeed-stack-mcp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mcp_servers:
2929
- name: "mcp-file"
3030
url: "http://mock-mcp:3001"
3131
authorization_headers:
32-
Authorization: "/tmp/mcp-secret-token"
32+
Authorization: "/tmp/mcp-token"
3333
- name: "mcp-client"
3434
url: "http://mock-mcp:3001"
3535
authorization_headers:

tests/e2e/configuration/server-mode/lightspeed-stack-invalid-mcp-file-auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ mcp_servers:
2222
- name: "mcp-file"
2323
url: "http://mock-mcp:3001"
2424
authorization_headers:
25-
Authorization: "/tmp/invalid-mcp-secret-token"
25+
Authorization: "/tmp/invalid-mcp-token"

tests/e2e/configuration/server-mode/lightspeed-stack-mcp-file-auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ mcp_servers:
2222
- name: "mcp-file"
2323
url: "http://mock-mcp:3001"
2424
authorization_headers:
25-
Authorization: "/tmp/mcp-secret-token"
25+
Authorization: "/tmp/mcp-token"

tests/e2e/configuration/server-mode/lightspeed-stack-mcp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mcp_servers:
3030
- name: "mcp-file"
3131
url: "http://mock-mcp:3001"
3232
authorization_headers:
33-
Authorization: "/tmp/mcp-secret-token"
33+
Authorization: "/tmp/mcp-token"
3434
- name: "mcp-client"
3535
url: "http://mock-mcp:3001"
3636
authorization_headers:

tests/e2e/features/mcp.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: MCP tests
1010
@MCPFileAuthConfig
1111
Scenario: Check if tools endpoint succeeds when MCP file-based auth token is passed
1212
Given The system is in default state
13-
And The mcp-file mcp server Authorization header is set to "/tmp/mcp-secret-token"
13+
And The mcp-file mcp server Authorization header is set to "/tmp/mcp-token"
1414
When I access REST API endpoint "tools" using HTTP GET method
1515
Then The status code of the response is 200
1616
And The body of the response contains mcp-file
@@ -19,7 +19,7 @@ Feature: MCP tests
1919
@MCPFileAuthConfig
2020
Scenario: Check if query endpoint succeeds when MCP file-based auth token is passed
2121
Given The system is in default state
22-
And The mcp-file mcp server Authorization header is set to "/tmp/mcp-secret-token"
22+
And The mcp-file mcp server Authorization header is set to "/tmp/mcp-token"
2323
And I capture the current token metrics
2424
When I use "query" to ask question
2525
"""
@@ -35,7 +35,7 @@ Feature: MCP tests
3535
@MCPFileAuthConfig
3636
Scenario: Check if streaming_query endpoint succeeds when MCP file-based auth token is passed
3737
Given The system is in default state
38-
And The mcp-file mcp server Authorization header is set to "/tmp/mcp-secret-token"
38+
And The mcp-file mcp server Authorization header is set to "/tmp/mcp-token"
3939
And I capture the current token metrics
4040
When I use "streaming_query" to ask question
4141
"""
@@ -51,7 +51,7 @@ Feature: MCP tests
5151
@InvalidMCPFileAuthConfig
5252
Scenario: Check if tools endpoint reports error when MCP file-based invalid auth token is passed
5353
Given The system is in default state
54-
And The mcp-file mcp server Authorization header is set to "/tmp/invalid-mcp-secret-token"
54+
And The mcp-file mcp server Authorization header is set to "/tmp/invalid-mcp-token"
5555
When I access REST API endpoint "tools" using HTTP GET method
5656
Then The status code of the response is 401
5757
And The body of the response is the following
@@ -68,7 +68,7 @@ Feature: MCP tests
6868
@InvalidMCPFileAuthConfig
6969
Scenario: Check if query endpoint reports error when MCP file-based invalid auth token is passed
7070
Given The system is in default state
71-
And The mcp-file mcp server Authorization header is set to "/tmp/invalid-mcp-secret-token"
71+
And The mcp-file mcp server Authorization header is set to "/tmp/invalid-mcp-token"
7272
When I use "query" to ask question
7373
"""
7474
{"query": "Say hello", "model": "{MODEL}", "provider": "{PROVIDER}"}
@@ -88,7 +88,7 @@ Feature: MCP tests
8888
@InvalidMCPFileAuthConfig
8989
Scenario: Check if streaming_query endpoint reports error when MCP file-based invalid auth token is passed
9090
Given The system is in default state
91-
And The mcp-file mcp server Authorization header is set to "/tmp/invalid-mcp-secret-token"
91+
And The mcp-file mcp server Authorization header is set to "/tmp/invalid-mcp-token"
9292
When I use "streaming_query" to ask question
9393
"""
9494
{"query": "Say hello", "model": "{MODEL}", "provider": "{PROVIDER}"}

0 commit comments

Comments
 (0)