Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions tests/e2e/features/query.feature
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,36 @@ Feature: Query endpoint API tests
}
"""

Scenario: Check if LLM responds to sent question with error when authenticated with invalid token
Given The system is in default state
And I set the Authorization header to Bearer invalid
When I use "query" to ask question with authorization header
"""
{"query": "Write a simple code for reversing string", "model": "{MODEL}", "provider": "{PROVIDER}"}
"""
Then The status code of the response is 401
And The body of the response contains Missing or invalid credentials provided by client

Scenario: Check if LLM responds to sent question with error when bearer token is missing
Given The system is in default state
And I set the Authorization header to Bearer
When I use "query" to ask question with authorization header
"""
{"query": "Write a simple code for reversing string", "model": "{MODEL}", "provider": "{PROVIDER}"}
"""
Then The status code of the response is 401
And The body of the response contains No token found in Authorization header

Scenario: Check if LLM responds to sent question with error when model does not exist
Given The system is in default state
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
When I use "query" to ask question with authorization header
"""
{"query": "Write a simple code for reversing string", "model": "does-not-exist", "provider": "does-not-exist"}
"""
Then The status code of the response is 404
And The body of the response contains Model not found

Scenario: Check if LLM responds to sent question with error when attempting to access conversation
Given The system is in default state
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
Expand Down
Loading