mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 10:07:41 +00:00
tests: fix detect-secrets false positives (#39084)
* Tests: rename gateway status env token fixture * Tests: allowlist feishu onboarding fixtures * Tests: allowlist Google Chat private key fixture * Docs: allowlist Brave API key example * Tests: allowlist pairing password env fixtures * Chore: refresh detect-secrets baseline
This commit is contained in:
@@ -149,7 +149,7 @@ function makeRemoteGatewayConfig(url: string, token = "rtok", localToken = "ltok
|
||||
};
|
||||
}
|
||||
|
||||
function mockLocalTokenSecretRefConfig(secretId = "MISSING_GATEWAY_TOKEN") {
|
||||
function mockLocalTokenEnvRefConfig(envTokenId = "MISSING_GATEWAY_TOKEN") {
|
||||
loadConfig.mockReturnValueOnce({
|
||||
secrets: {
|
||||
providers: {
|
||||
@@ -160,7 +160,7 @@ function mockLocalTokenSecretRefConfig(secretId = "MISSING_GATEWAY_TOKEN") {
|
||||
mode: "local",
|
||||
auth: {
|
||||
mode: "token",
|
||||
token: { source: "env", provider: "default", id: secretId },
|
||||
token: { source: "env", provider: "default", id: envTokenId },
|
||||
},
|
||||
},
|
||||
} as unknown as ReturnType<typeof loadConfig>);
|
||||
@@ -204,7 +204,7 @@ describe("gateway-status command", () => {
|
||||
it("surfaces unresolved SecretRef auth diagnostics in warnings", async () => {
|
||||
const { runtime, runtimeLogs, runtimeErrors } = createRuntimeCapture();
|
||||
await withEnvAsync({ MISSING_GATEWAY_TOKEN: undefined }, async () => {
|
||||
mockLocalTokenSecretRefConfig();
|
||||
mockLocalTokenEnvRefConfig();
|
||||
|
||||
await runGatewayStatus(runtime, { timeout: "1000", json: true });
|
||||
});
|
||||
@@ -232,7 +232,7 @@ describe("gateway-status command", () => {
|
||||
MISSING_GATEWAY_TOKEN: undefined,
|
||||
},
|
||||
async () => {
|
||||
mockLocalTokenSecretRefConfig();
|
||||
mockLocalTokenEnvRefConfig();
|
||||
|
||||
await runGatewayStatus(runtime, { timeout: "1000", json: true });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user