mirror of
https://github.com/alibaba/higress.git
synced 2026-05-25 21:28:17 +08:00
test(ai-proxy): expand wasm integration tests, coverage, and provider matrix (#3790)
Signed-off-by: jingze <daijingze.djz@alibaba-inc.com>
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/alibaba/higress/plugins/wasm-go/extensions/ai-proxy/util"
|
||||
)
|
||||
|
||||
// LegacyProviderPluginJSON builds the top-level plugin JSON with a single legacy "provider"
|
||||
// object, matching historical wasm integration tests (see test/openai.go).
|
||||
func LegacyProviderPluginJSON(provider map[string]interface{}) json.RawMessage {
|
||||
data, _ := json.Marshal(map[string]interface{}{"provider": provider})
|
||||
return json.RawMessage(data)
|
||||
}
|
||||
|
||||
func RunMapRequestPathByCapabilityTests(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user