mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 09:30:27 +00:00
refactor(downloader): remove opts parameter from Resolve (#1595)
This commit is contained in:
45 files changed
+1589
-384
No files matched your search
@@ -101,6 +101,13 @@ func TestStreamableHTTPTools(t *testing.T) {
|
||||
if reqExtra["type"] != "object" || !ok || len(branches) != 2 {
|
||||
t.Fatalf("%s req.extra schema = %#v, want an object with two oneOf branches", tool.Name, reqExtra)
|
||||
}
|
||||
if tool.Name == "resolve_task" {
|
||||
properties := schema["properties"].(map[string]any)
|
||||
if _, exists := properties["opts"]; exists || len(properties) != 1 {
|
||||
t.Fatalf("resolve_task must expose only req: %s", inputSchema)
|
||||
}
|
||||
continue
|
||||
}
|
||||
optsExtra := nestedSchemaProperty(t, schema, "opts", "extra")
|
||||
if !schemaIncludesType(optsExtra, "object") || optsExtra["additionalProperties"] != false {
|
||||
t.Fatalf("%s opts.extra schema = %#v, want concrete HTTP task settings", tool.Name, optsExtra)
|
||||
|
||||
Reference in new issue
Block a user