mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 11:47:28 +00:00
fix(telegram): move network fallback to resolver-scoped dispatchers (#40740)
Merged via squash.
Prepared head SHA: a4456d48b4
Co-authored-by: sircrumpet <4436535+sircrumpet@users.noreply.github.com>
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com>
Reviewed-by: @obviyus
This commit is contained in:
@@ -29,7 +29,7 @@ vi.mock("undici", () => ({
|
||||
setGlobalDispatcher: mocks.setGlobalDispatcher,
|
||||
}));
|
||||
|
||||
import { makeProxyFetch } from "./proxy.js";
|
||||
import { getProxyUrlFromFetch, makeProxyFetch } from "./proxy.js";
|
||||
|
||||
describe("makeProxyFetch", () => {
|
||||
it("uses undici fetch with ProxyAgent dispatcher", async () => {
|
||||
@@ -46,4 +46,11 @@ describe("makeProxyFetch", () => {
|
||||
);
|
||||
expect(mocks.setGlobalDispatcher).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("attaches proxy metadata for resolver transport handling", () => {
|
||||
const proxyUrl = "http://proxy.test:8080";
|
||||
const proxyFetch = makeProxyFetch(proxyUrl);
|
||||
|
||||
expect(getProxyUrlFromFetch(proxyFetch)).toBe(proxyUrl);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user