test: extend plugin contract setup timeouts

This commit is contained in:
Tak Hoffman 2026-03-18 09:42:52 -05:00
parent ca13256913
commit 5d41fd4497
No known key found for this signature in database
3 changed files with 9 additions and 3 deletions

View File

@ -5,6 +5,8 @@ import {
expectCodexMissingAuthHint,
} from "../provider-runtime.test-support.js";
const CONTRACT_SETUP_TIMEOUT_MS = 300_000;
type ResolvePluginProviders = typeof import("../providers.js").resolvePluginProviders;
type ResolveOwningPluginIdsForProvider =
typeof import("../providers.js").resolveOwningPluginIdsForProvider;
@ -74,7 +76,7 @@ describe("provider catalog contract", () => {
resolveProviderBuiltInModelSuppression,
} = await import("../provider-runtime.js"));
resetProviderRuntimeHookCacheForTest();
});
}, CONTRACT_SETUP_TIMEOUT_MS);
it("keeps codex-only missing-auth hints wired through the provider runtime", () => {
expectCodexMissingAuthHint(buildProviderMissingAuthMessageWithPlugin);

View File

@ -7,6 +7,8 @@ import { createProviderUsageFetch, makeResponse } from "../../test-utils/provide
import type { OpenClawPluginApi, ProviderPlugin } from "../types.js";
import type { ProviderRuntimeModel } from "../types.js";
const CONTRACT_SETUP_TIMEOUT_MS = 300_000;
const getOAuthApiKeyMock = vi.hoisted(() => vi.fn());
const refreshQwenPortalCredentialsMock = vi.hoisted(() => vi.fn());
@ -80,7 +82,7 @@ describe("provider runtime contract", () => {
qwenPortalPlugin = (await import("../../../extensions/qwen-portal-auth/index.js")).default;
getOAuthApiKeyMock.mockReset();
refreshQwenPortalCredentialsMock.mockReset();
});
}, CONTRACT_SETUP_TIMEOUT_MS);
describe("anthropic", () => {
it("owns anthropic 4.6 forward-compat resolution", () => {

View File

@ -1,6 +1,8 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { ProviderPlugin } from "../types.js";
const CONTRACT_SETUP_TIMEOUT_MS = 300_000;
const resolvePluginProvidersMock = vi.fn();
let buildProviderPluginMethodChoice: typeof import("../provider-wizard.js").buildProviderPluginMethodChoice;
@ -83,7 +85,7 @@ describe("provider wizard contract", () => {
resolveProviderPluginChoice,
resolveProviderWizardOptions,
} = await import("../provider-wizard.js"));
});
}, CONTRACT_SETUP_TIMEOUT_MS);
it("exposes every registered provider setup choice through the shared wizard layer", () => {
const options = resolveProviderWizardOptions({