mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
fix: preserve status json update metadata
This commit is contained in:
parent
a2d6bf1455
commit
47a63f87ea
2 changed files with 15 additions and 7 deletions
|
|
@ -113,12 +113,18 @@ describe("scanStatusJsonFast", () => {
|
|||
expect(mocks.buildPluginCompatibilityNotices).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("keeps update checks off the default fast JSON path", async () => {
|
||||
it("keeps default fast JSON update scans local-only", async () => {
|
||||
mocks.hasPotentialConfiguredChannels.mockReturnValue(true);
|
||||
|
||||
await scanStatusJsonFast({ timeoutMs: 1234 }, {} as never);
|
||||
|
||||
expect(mocks.getUpdateCheckResult).not.toHaveBeenCalled();
|
||||
expect(mocks.getUpdateCheckResult).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
timeoutMs: 1234,
|
||||
fetchGit: false,
|
||||
includeRegistry: false,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("restores registry-backed update checks and remote git fetches when --all is requested", async () => {
|
||||
|
|
@ -245,7 +251,7 @@ describe("scanStatusJsonFast", () => {
|
|||
expect(mocks.probeGateway).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("keeps cold-start gateway probes but skips update checks when a channel is configured from manifest env vars", async () => {
|
||||
it("keeps cold-start gateway probes with local-only updates when a channel is configured from manifest env vars", async () => {
|
||||
await withTemporaryEnv(
|
||||
{
|
||||
OPENCLAW_TWITCH_ACCESS_TOKEN: "token",
|
||||
|
|
@ -258,7 +264,12 @@ describe("scanStatusJsonFast", () => {
|
|||
},
|
||||
);
|
||||
|
||||
expect(mocks.getUpdateCheckResult).not.toHaveBeenCalled();
|
||||
expect(mocks.getUpdateCheckResult).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
fetchGit: false,
|
||||
includeRegistry: false,
|
||||
}),
|
||||
);
|
||||
expect(mocks.probeGateway).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ type StatusJsonScanPolicy = {
|
|||
commandName: string;
|
||||
allowMissingConfigFastPath?: boolean;
|
||||
includeChannelSummary?: boolean;
|
||||
skipUpdateCheck?: boolean;
|
||||
fetchGitUpdate?: boolean;
|
||||
includeRegistryUpdate?: boolean;
|
||||
includeLocalStatusRpcFallback?: boolean;
|
||||
|
|
@ -95,7 +94,6 @@ export async function scanStatusJsonWithPolicy(
|
|||
includeChannelsData: false,
|
||||
includeChannelSecretTargets: false,
|
||||
skipConfigPluginValidation: true,
|
||||
skipUpdateCheck: policy.skipUpdateCheck,
|
||||
fetchGitUpdate: policy.fetchGitUpdate,
|
||||
includeRegistryUpdate: policy.includeRegistryUpdate,
|
||||
includeLocalStatusRpcFallback: policy.includeLocalStatusRpcFallback,
|
||||
|
|
@ -125,7 +123,6 @@ export async function scanStatusJsonFast(
|
|||
commandName: "status --json",
|
||||
allowMissingConfigFastPath: true,
|
||||
includeChannelSummary: false,
|
||||
skipUpdateCheck: opts.all !== true,
|
||||
fetchGitUpdate: opts.all === true,
|
||||
includeRegistryUpdate: opts.all === true,
|
||||
includeLocalStatusRpcFallback: opts.all === true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue