chore: fork — remove vendor CI, repoint release checks to Neuron Gitea
This commit is contained in:
@@ -39,7 +39,7 @@ function providerAuthLayer(directory: string, plugins: string[]) {
|
||||
|
||||
describe("plugin.auth-override", () => {
|
||||
it.instance(
|
||||
"user plugin overrides built-in github-copilot auth",
|
||||
"user plugin auth entries are listed alongside built-ins",
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const tmp = yield* TestInstance
|
||||
@@ -47,13 +47,13 @@ describe("plugin.auth-override", () => {
|
||||
const pluginDir = path.join(tmp.directory, ".opencode", "plugin")
|
||||
|
||||
yield* fs.writeWithDirs(
|
||||
path.join(pluginDir, "custom-copilot-auth.ts"),
|
||||
path.join(pluginDir, "custom-auth.ts"),
|
||||
[
|
||||
"export default {",
|
||||
' id: "demo.custom-copilot-auth",',
|
||||
' id: "demo.custom-auth",',
|
||||
" server: async () => ({",
|
||||
" auth: {",
|
||||
' provider: "github-copilot",',
|
||||
' provider: "openai",',
|
||||
" methods: [",
|
||||
' { type: "api", label: "Test Override Auth" },',
|
||||
" ],",
|
||||
@@ -66,7 +66,7 @@ describe("plugin.auth-override", () => {
|
||||
)
|
||||
|
||||
const plain = yield* tmpdirScoped({ git: true })
|
||||
const plugin = pathToFileURL(path.join(pluginDir, "custom-copilot-auth.ts")).href
|
||||
const plugin = pathToFileURL(path.join(pluginDir, "custom-auth.ts")).href
|
||||
const methods = yield* ProviderAuth.use
|
||||
.methods()
|
||||
.pipe(Effect.provide(providerAuthLayer(tmp.directory, [plugin])))
|
||||
@@ -74,11 +74,11 @@ describe("plugin.auth-override", () => {
|
||||
.methods()
|
||||
.pipe(Effect.provide(providerAuthLayer(plain, [])), provideInstance(plain))
|
||||
|
||||
const copilot = methods[ProviderV2.ID.make("github-copilot")]
|
||||
expect(copilot).toBeDefined()
|
||||
expect(copilot.length).toBe(1)
|
||||
expect(copilot[0].label).toBe("Test Override Auth")
|
||||
expect(plainMethods[ProviderV2.ID.make("github-copilot")][0].label).not.toBe("Test Override Auth")
|
||||
const override = methods[ProviderV2.ID.make("openai")]
|
||||
expect(override).toBeDefined()
|
||||
expect(override.length).toBe(1)
|
||||
expect(override[0].label).toBe("Test Override Auth")
|
||||
expect(plainMethods[ProviderV2.ID.make("openai")][0].label).not.toBe("Test Override Auth")
|
||||
}),
|
||||
{ git: true },
|
||||
30000,
|
||||
|
||||
Reference in New Issue
Block a user