refactor remove upstream env dependency (#551)

This commit is contained in:
ekko
2026-05-08 20:46:22 +08:00
committed by GitHub
parent bba4920fee
commit 51fde26797
13 changed files with 90 additions and 165 deletions
+4 -5
View File
@@ -1,11 +1,10 @@
import { beforeEach, describe, expect, it, vi } from 'vitest'
vi.mock('../../packages/server/src/config', () => ({
config: { upstream: 'http://127.0.0.1:8642' },
}))
vi.mock('../../packages/server/src/services/gateway-bootstrap', () => ({
getGatewayManagerInstance: () => null,
getGatewayManagerInstance: () => ({
getUpstream: () => 'http://127.0.0.1:8642',
getApiKey: () => null,
}),
}))
const mockFetch = vi.fn()