mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-20 05:31:39 +00:00
refactor: delete dead infra and config exports (#106019)
* refactor: delete dead infra and config exports * refactor: preserve live infra and config contracts * refactor(config): remove obsolete file-store lifecycle APIs * refactor(infra): finish current-main dead export cleanup
This commit is contained in:
committed by
GitHub
parent
8dd57279cd
commit
d1684f48a3
@@ -1,7 +1,9 @@
|
||||
// Daemon restart health tests cover health checks after daemon restart operations.
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { GatewayService } from "../../daemon/service.js";
|
||||
import type { PortListenerKind, PortUsage } from "../../infra/ports.js";
|
||||
import type { PortUsage } from "../../infra/ports.js";
|
||||
|
||||
type PortListenerKind = ReturnType<typeof import("../../infra/ports.js").classifyPortListener>;
|
||||
|
||||
const inspectPortUsage = vi.hoisted(() => vi.fn<(port: number) => Promise<PortUsage>>());
|
||||
const sleep = vi.hoisted(() => vi.fn(async (_ms: number) => {}));
|
||||
|
||||
@@ -5,13 +5,17 @@ import path from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { StaleOpenClawUpdateLaunchdJob } from "../../daemon/launchd.js";
|
||||
import { createMockGatewayService } from "../../daemon/service.test-helpers.js";
|
||||
import type { PortConnections, PortListener, PortUsageStatus } from "../../infra/ports.js";
|
||||
import type { PortListener, PortUsageStatus } from "../../infra/ports.js";
|
||||
import type { GatewayRestartHandoff } from "../../infra/restart-handoff.js";
|
||||
import { captureEnv, deleteTestEnvValue, setTestEnvValue } from "../../test-utils/env.js";
|
||||
import { VERSION } from "../../version.js";
|
||||
import type { GatewayRestartSnapshot } from "./restart-health.js";
|
||||
import { gatherDaemonStatus } from "./status.gather.js";
|
||||
|
||||
type PortConnections = Awaited<
|
||||
ReturnType<typeof import("../../infra/ports.js").inspectPortConnections>
|
||||
>;
|
||||
|
||||
const callGatewayStatusProbe = vi.fn<
|
||||
(opts?: unknown) => Promise<{
|
||||
ok: boolean;
|
||||
|
||||
@@ -1129,6 +1129,7 @@ describe("runGatewayLoop", () => {
|
||||
expect(markGatewaySigusr1RestartHandled).toHaveBeenCalledTimes(1);
|
||||
expect(markGatewayDraining).toHaveBeenCalledTimes(1);
|
||||
expect(resetAllLanes).toHaveBeenCalledTimes(1);
|
||||
expect(resetGatewaySuspendCoordinatorForLifecycleRestart).toHaveBeenCalledTimes(1);
|
||||
expect(resetGatewayRestartStateForInProcessRestart).toHaveBeenCalledTimes(1);
|
||||
expect(reloadTaskRuntimeStateFromStore).toHaveBeenCalledTimes(1);
|
||||
} finally {
|
||||
@@ -1318,6 +1319,7 @@ describe("runGatewayLoop", () => {
|
||||
expect(markGatewaySigusr1RestartHandled).toHaveBeenCalledTimes(2);
|
||||
expect(markGatewayDraining).toHaveBeenCalledTimes(2);
|
||||
expect(resetAllLanes).toHaveBeenCalledTimes(2);
|
||||
expect(resetGatewaySuspendCoordinatorForLifecycleRestart).toHaveBeenCalledTimes(2);
|
||||
expect(resetGatewayRestartStateForInProcessRestart).toHaveBeenCalledTimes(2);
|
||||
expect(reloadTaskRuntimeStateFromStore).toHaveBeenCalledTimes(2);
|
||||
expect(acquireGatewayLock).toHaveBeenCalledTimes(3);
|
||||
@@ -1390,6 +1392,7 @@ describe("runGatewayLoop", () => {
|
||||
expect(markGatewaySigusr1RestartHandled).toHaveBeenCalledTimes(2);
|
||||
expect(markGatewayDraining).toHaveBeenCalledTimes(2);
|
||||
expect(resetAllLanes).toHaveBeenCalledTimes(2);
|
||||
expect(resetGatewaySuspendCoordinatorForLifecycleRestart).toHaveBeenCalledTimes(2);
|
||||
expect(resetGatewayRestartStateForInProcessRestart).toHaveBeenCalledTimes(2);
|
||||
expect(reloadTaskRuntimeStateFromStore).toHaveBeenCalledTimes(2);
|
||||
expect(acquireGatewayLock).toHaveBeenCalledTimes(3);
|
||||
|
||||
@@ -7,12 +7,12 @@ import path from "node:path";
|
||||
import { expectDefined } from "@openclaw/normalization-core";
|
||||
import { Command } from "commander";
|
||||
import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { writePackageDistInventory } from "../../scripts/lib/package-dist-inventory.ts";
|
||||
import { TEST_BUNDLED_RUNTIME_SIDECAR_PATHS } from "../../test/helpers/bundled-runtime-sidecars.js";
|
||||
import type { OpenClawConfig, ConfigFileSnapshot } from "../config/types.openclaw.js";
|
||||
import type { PluginInstallRecord } from "../config/types.plugins.js";
|
||||
import { GATEWAY_SERVICE_RUNTIME_PID_ENV } from "../daemon/constants.js";
|
||||
import type { ClawHubRiskAcknowledgementRequest } from "../infra/clawhub-install-trust.js";
|
||||
import { writePackageDistInventory } from "../infra/package-dist-inventory.js";
|
||||
import { isBetaTag } from "../infra/update-channels.js";
|
||||
import {
|
||||
createDeferredConfiguredPluginRepairDoctorResult,
|
||||
|
||||
Reference in New Issue
Block a user