@@ -174,6 +174,10 @@ vi.mock("../infra/restart-stale-pids.js", () => ({
|
174 | 174 | getSelfAndAncestorPidsSync: () => mockGetSelfAndAncestorPidsSync(), |
175 | 175 | })); |
176 | 176 | |
| 177 | +vi.mock("../infra/update-managed-service-handoff-cleanup.js", () => ({ |
| 178 | +cleanupStaleManagedServiceUpdateHandoffs: vi.fn(async () => 0), |
| 179 | +})); |
| 180 | + |
177 | 181 | vi.mock("node:child_process", async () => { |
178 | 182 | const actual = await vi.importActual<typeof import("node:child_process")>("node:child_process"); |
179 | 183 | return { |
@@ -224,6 +228,32 @@ vi.mock("../plugins/installed-plugin-index-records.js", async (importOriginal) =
|
224 | 228 | }; |
225 | 229 | }); |
226 | 230 | |
| 231 | +vi.mock("./update-cli/post-core-plugin-convergence.js", () => ({ |
| 232 | +convergenceWarningsToOutcomes: (convergence: { |
| 233 | +warnings: Array<{ pluginId?: string; message: string }>; |
| 234 | +errored: boolean; |
| 235 | +}) => ({ |
| 236 | +warnings: convergence.warnings, |
| 237 | +outcomes: convergence.warnings |
| 238 | +.filter((warning): warning is { pluginId: string; message: string } => |
| 239 | +Boolean(warning.pluginId), |
| 240 | +) |
| 241 | +.map((warning) => ({ |
| 242 | +pluginId: warning.pluginId, |
| 243 | +status: "error", |
| 244 | +message: warning.message, |
| 245 | +})), |
| 246 | +errored: convergence.errored, |
| 247 | +}), |
| 248 | +runPostCorePluginConvergence: vi.fn(async (params: { baselineInstallRecords?: unknown }) => ({ |
| 249 | +changes: [], |
| 250 | +warnings: [], |
| 251 | +errored: false, |
| 252 | +smokeFailures: [], |
| 253 | +installRecords: params.baselineInstallRecords ?? {}, |
| 254 | +})), |
| 255 | +})); |
| 256 | + |
227 | 257 | vi.mock("../daemon/service.js", () => ({ |
228 | 258 | readGatewayServiceState: async () => { |
229 | 259 | const command = await serviceReadCommand(); |
|