Skip to content

Commit 8361b37

Browse files
authored
Merge pull request lightspeed-core#1091 from radofuchs/E2E_OLS_Alignment
LCORE-1206add extra e2e tests to align with OLS
2 parents 9ac4e80 + 7e37064 commit 8361b37

2 files changed

Lines changed: 51 additions & 11 deletions

File tree

tests/e2e/features/query.feature

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,6 @@ Feature: Query endpoint API tests
7676
Then The status code of the response is 401
7777
And The body of the response contains No token found in Authorization header
7878

79-
Scenario: Check if LLM responds to sent question with error when model does not exist
80-
Given The system is in default state
81-
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
82-
When I use "query" to ask question with authorization header
83-
"""
84-
{"query": "Write a simple code for reversing string", "model": "does-not-exist", "provider": "does-not-exist"}
85-
"""
86-
Then The status code of the response is 404
87-
And The body of the response contains Model not found
88-
8979
Scenario: Check if LLM responds to sent question with error when attempting to access conversation
9080
Given The system is in default state
9181
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
@@ -96,6 +86,16 @@ Feature: Query endpoint API tests
9686
Then The status code of the response is 404
9787
And The body of the response contains Conversation not found
9888

89+
Scenario: Check if LLM responds to sent question with error when attempting to access conversation with incorrect conversation ID format
90+
Given The system is in default state
91+
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
92+
When I use "query" to ask question with authorization header
93+
"""
94+
{"conversation_id": "123e4567", "query": "Write a simple code for reversing string", "model": "{MODEL}", "provider": "{PROVIDER}"}
95+
"""
96+
Then The status code of the response is 422
97+
And The body of the response contains Value error, Improper conversation ID '123e4567'
98+
9999
Scenario: Check if LLM responds for query request with error for missing query
100100
Given The system is in default state
101101
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
@@ -138,8 +138,28 @@ Scenario: Check if LLM responds for query request with error for missing query
138138
Then The status code of the response is 422
139139
And The body of the response contains Value error, Provider must be specified if model is specified
140140

141+
Scenario: Check if LLM responds for query request with error for unknown model
142+
Given The system is in default state
143+
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
144+
When I use "query" to ask question with authorization header
145+
"""
146+
{"query": "Say hello", "provider": "{PROVIDER}", "model":"unknown"}
147+
"""
148+
Then The status code of the response is 404
149+
And The body of the response contains Model with ID unknown does not exist
150+
151+
Scenario: Check if LLM responds for query request with error for unknown provider
152+
Given The system is in default state
153+
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
154+
When I use "query" to ask question with authorization header
155+
"""
156+
{"query": "Say hello", "model": "{MODEL}", "provider":"unknown"}
157+
"""
158+
Then The status code of the response is 404
159+
And The body of the response contains Model with ID gpt-4o-mini does not exist
160+
141161
@skip-in-library-mode
142-
Scenario: Check if LLM responds for query request with error for missing provider
162+
Scenario: Check if LLM responds for query request with error for inability to connect to llama-stack
143163
Given The system is in default state
144164
And The llama-stack connection is disrupted
145165
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva

tests/e2e/features/streaming_query.feature

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,26 @@ Feature: streaming_query endpoint API tests
105105
Then The status code of the response is 422
106106
And The body of the response contains Value error, Provider must be specified if model is specified
107107

108+
Scenario: Check if LLM responds for query request with error for unknown model
109+
Given The system is in default state
110+
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
111+
When I use "streaming_query" to ask question with authorization header
112+
"""
113+
{"query": "Say hello", "provider": "{PROVIDER}", "model":"unknown"}
114+
"""
115+
Then The status code of the response is 404
116+
And The body of the response contains Model with ID unknown does not exist
117+
118+
Scenario: Check if LLM responds for query request with error for unknown provider
119+
Given The system is in default state
120+
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
121+
When I use "streaming_query" to ask question with authorization header
122+
"""
123+
{"query": "Say hello", "model": "{MODEL}", "provider":"unknown"}
124+
"""
125+
Then The status code of the response is 404
126+
And The body of the response contains Model with ID gpt-4o-mini does not exist
127+
108128
Scenario: Check if LLM responds properly when XML and JSON attachments are sent
109129
Given The system is in default state
110130
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva

0 commit comments

Comments
 (0)