Skip to content

Commit

Permalink
fix ai-proxy e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiantao committed Jan 30, 2025
1 parent 8aa8fa1 commit 143d815
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test/e2e/conformance/tests/go-wasm-ai-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ data: [DONE]
},
Response: http.AssertionResponse{
ExpectedResponse: http.Response{
StatusCode: 200,
ContentType: http.ContentTypeApplicationJson,
StatusCode: 200,
ContentType: http.ContentTypeApplicationJson,
// Since the "created" field is generated by the ai-proxy plugin based on the current timestamp, it is ignored during comparison
JsonBodyIgnoreFields: []string{"created"},
Body: []byte(`{"id":"chatcmpl-llm-mock","choices":[{"index":0,"message":{"role":"assistant","content":"你好,你是谁?"},"finish_reason":"stop"}],"created":1738218357,"model":"qwen-turbo","object":"chat.completion","usage":{"prompt_tokens":9,"completion_tokens":1,"total_tokens":10}}`),
},
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/conformance/tests/go-wasm-ai-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ spec:
type: qwen
ingress:
- higress-conformance-ai-backend/wasmplugin-ai-proxy-qwen
url: file:///opt/plugins/wasm-go/extensions/ai-proxy/plugin.wasm
url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:1.0.0

0 comments on commit 143d815

Please # to comment.