mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 10:55:07 +00:00
[AI-assisted] test: fix typing and test fixture issues (#31444)
* test: fix typing and test fixture issues * Fix type-test harness issues from session routing and mock typing * Add routing regression test for session.mainKey precedence
This commit is contained in:
@@ -3,7 +3,7 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import type { ExecSecretProviderConfig, SecretProviderConfig } from "../config/types.secrets.js";
|
||||
import type { SecretProviderConfig } from "../config/types.secrets.js";
|
||||
import { resolveSecretRefString, resolveSecretRefValue } from "./resolve.js";
|
||||
|
||||
async function writeSecureFile(filePath: string, content: string, mode = 0o600): Promise<void> {
|
||||
@@ -52,14 +52,14 @@ describe("secret ref resolver", () => {
|
||||
|
||||
function createExecProvider(
|
||||
command: string,
|
||||
overrides?: Partial<ExecSecretProviderConfig>,
|
||||
): ExecSecretProviderConfig {
|
||||
overrides?: Record<string, unknown>,
|
||||
): SecretProviderConfig {
|
||||
return {
|
||||
source: "exec",
|
||||
command,
|
||||
passEnv: ["PATH"],
|
||||
...overrides,
|
||||
};
|
||||
} as SecretProviderConfig;
|
||||
}
|
||||
|
||||
async function expectExecResolveRejects(
|
||||
|
||||
Reference in New Issue
Block a user