mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-05 07:00:00 +00:00
test(opencode): remove deferred provider policy coverage
This commit is contained in:
parent
6ad2967db9
commit
b9d552f1df
1 changed files with 0 additions and 19 deletions
|
|
@ -6,7 +6,6 @@ import { ModelsDev } from "@opencode-ai/core/models-dev"
|
|||
import { AppFileSystem } from "@opencode-ai/core/filesystem"
|
||||
import { CrossSpawnSpawner } from "@opencode-ai/core/cross-spawn-spawner"
|
||||
import { Global } from "@opencode-ai/core/global"
|
||||
import { LocationServiceMap } from "@opencode-ai/core/location-layer"
|
||||
import { disposeAllInstances, provideInstanceEffect, tmpdirScoped, TestInstance } from "../fixture/fixture"
|
||||
import { markPluginDependenciesReady } from "../fixture/plugin"
|
||||
import { Auth } from "@/auth"
|
||||
|
|
@ -64,7 +63,6 @@ const providerLayer = (flags: Partial<RuntimeFlags.Info> = {}) =>
|
|||
Layer.provide(Plugin.defaultLayer),
|
||||
Layer.provide(ModelsDev.defaultLayer),
|
||||
Layer.provide(RuntimeFlags.layer(flags)),
|
||||
Layer.provide(LocationServiceMap.layer),
|
||||
)
|
||||
|
||||
const list = Provider.use.list()
|
||||
|
|
@ -102,13 +100,6 @@ const alphaProviderConfig = {
|
|||
},
|
||||
}
|
||||
|
||||
const denyAnthropicPolicyConfig = {
|
||||
provider: {},
|
||||
experimental: {
|
||||
policies: [{ effect: "deny" as const, action: "provider.use" as const, resource: "anthropic" }],
|
||||
},
|
||||
}
|
||||
|
||||
it.instance("provider loaded from env variable", () =>
|
||||
Effect.gen(function* () {
|
||||
yield* setProcessEnv("ANTHROPIC_API_KEY", "test-api-key")
|
||||
|
|
@ -140,16 +131,6 @@ it.instance(
|
|||
{ config: { disabled_providers: ["anthropic"] } },
|
||||
)
|
||||
|
||||
it.instance(
|
||||
"experimental policies deny provider use",
|
||||
Effect.gen(function* () {
|
||||
yield* setProcessEnv("ANTHROPIC_API_KEY", "test-api-key")
|
||||
const providers = yield* list
|
||||
expect(providers[ProviderID.anthropic]).toBeUndefined()
|
||||
}),
|
||||
{ config: denyAnthropicPolicyConfig },
|
||||
)
|
||||
|
||||
it.instance(
|
||||
"enabled_providers restricts to only listed providers",
|
||||
Effect.gen(function* () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue