add hurl tests

This commit is contained in:
Adil Hafeez 2025-05-15 10:39:36 -07:00
parent 62c0448be4
commit 9931cdcc39
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,18 @@
POST http://localhost:9090/v1/chat/completions
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "I am running under debt, how should I keep a tab on my expenses?"
}
]
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^o4-mini/
jsonpath "$.usage" != null
jsonpath "$.choices[0].message.content" != null
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,16 @@
POST http://localhost:9090/v1/chat/completions
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "I am running under debt, how should I keep a tab on my expenses?"
}
],
"stream": true
}
HTTP 200
[Asserts]
header "content-type" matches /text\/event-stream/
body matches /^data: .*?o4-mini.*?\n/