Implement ollama e2e test case
增加了Ollama的e2e测试
Added Ollama’s e2e test
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 43.46%. Comparing base (810ef8f) to head (1734987).
Additional details and impacted files
@@ Coverage Diff @@
## main #3082 +/- ##
==========================================
+ Coverage 43.42% 43.46% +0.03%
==========================================
Files 82 82
Lines 10922 10922
==========================================
+ Hits 4743 4747 +4
+ Misses 5850 5848 -2
+ Partials 329 327 -2
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
希望社区同学能够提供一些帮助?我很愿意解决这个问题。
I hope classmates in the community can provide some help? I'd love to resolve this issue.
@Patrisam ollama的e2e测试已经修复了(具体改动点你可以看下,根据ai-proxy插件文档进行核对下),azure的e2e测试按照上面的流程也提交在这个pr中,执行通过后,我这边再进行review
有几个建议:
1)不要修改pr的描述的格式,请参考:https://github.com/alibaba/higress/pull/2815
2)先根据Higress官方文档本地搭建下Higress的环境,了解下Higress如何使用及相关概念
3)可以把这个e2e测试本地部署并执行一下,在部署完Higress后,需要部署mock-server(test/e2e/conformance/base/llm-mock.yaml)和e2e对应的case,示例如下:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: wasmplugin-ai-proxy-ollama
namespace: higress-conformance-ai-backend
spec:
ingressClassName: higress
rules:
- host: "ollama.e2e.host"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: llm-mock-service
port:
number: 3000
---
apiVersion: extensions.higress.io/v1alpha1
kind: WasmPlugin
metadata:
name: ai-proxy
namespace: higress-system
spec:
defaultConfigDisable: true
phase: UNSPECIFIED_PHASE
priority: 100
matchRules:
- config:
provider:
apiTokens:
- fake_token
modelMapping:
"gpt-3": gemma3
"*": gemma3
type: ollama
ollamaServerHost: llm-mock-service.higress-conformance-ai-backend.svc.cluster.local
ollamaServerPort: 3000
ingress:
- higress-conformance-ai-backend/wasmplugin-ai-proxy-ollama
# 本地和在线跑e2e测试的区别主要是在这里
url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:1.0.0
这样可以本地更好的进行验证