mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:00:47 +00:00
test: fix rebased local gates
This commit is contained in:
@@ -2,13 +2,13 @@ import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";
|
||||
import { resolveFeishuRuntimeAccount } from "./accounts.js";
|
||||
import { handleFeishuMessage, type FeishuMessageEvent } from "./bot.js";
|
||||
import { decodeFeishuCardAction, buildFeishuCardActionTextFallback } from "./card-interaction.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import {
|
||||
createApprovalCard,
|
||||
FEISHU_APPROVAL_CANCEL_ACTION,
|
||||
FEISHU_APPROVAL_CONFIRM_ACTION,
|
||||
FEISHU_APPROVAL_REQUEST_ACTION,
|
||||
} from "./card-ux-approval.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import { sendCardFeishu, sendMessageFeishu } from "./send.js";
|
||||
|
||||
export type FeishuCardActionEvent = {
|
||||
@@ -234,7 +234,10 @@ async function resolveCardActionChatType(params: {
|
||||
normalizeResolvedCardActionChatType(response.data?.chat_mode) ??
|
||||
normalizeResolvedCardActionChatType(response.data?.chat_type);
|
||||
if (resolvedChatType) {
|
||||
resolvedChatTypeCache.set(cacheKey, { value: resolvedChatType, expiresAt: now + CHAT_TYPE_CACHE_TTL_MS });
|
||||
resolvedChatTypeCache.set(cacheKey, {
|
||||
value: resolvedChatType,
|
||||
expiresAt: now + CHAT_TYPE_CACHE_TTL_MS,
|
||||
});
|
||||
return resolvedChatType;
|
||||
}
|
||||
params.log(
|
||||
|
||||
@@ -724,9 +724,7 @@ export function createTaskFlowWebhookRequestHandler(params: {
|
||||
return false;
|
||||
}
|
||||
const resolvedSecret = await resolveTargetSecret(candidate);
|
||||
return Boolean(
|
||||
resolvedSecret && timingSafeEquals(resolvedSecret, presentedSecret),
|
||||
);
|
||||
return Boolean(resolvedSecret && timingSafeEquals(resolvedSecret, presentedSecret));
|
||||
},
|
||||
});
|
||||
if (!target) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NON_ENV_SECRETREF_MARKER } from "openclaw/plugin-sdk/provider-auth-runtime";
|
||||
import { createNonExitingRuntime } from "openclaw/plugin-sdk/runtime-env";
|
||||
import { withEnv } from "openclaw/plugin-sdk/testing";
|
||||
import { withEnv, withEnvAsync } from "openclaw/plugin-sdk/testing";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { createWizardPrompter } from "../../test/helpers/wizard-prompter.js";
|
||||
import { resolveXaiCatalogEntry } from "./model-definitions.js";
|
||||
@@ -79,7 +79,7 @@ describe("xai web search config resolution", () => {
|
||||
});
|
||||
|
||||
it("treats unresolved non-env SecretRefs as missing credentials instead of throwing", async () => {
|
||||
await withEnv({ XAI_API_KEY: undefined }, async () => {
|
||||
await withEnvAsync({ XAI_API_KEY: undefined }, async () => {
|
||||
const provider = createXaiWebSearchProvider();
|
||||
const maybeTool = provider.createTool({
|
||||
config: {
|
||||
|
||||
Reference in New Issue
Block a user