From 6b83864158c5ac48e4342559e084d2671ee4ef1e Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Wed, 6 May 2026 21:19:57 +0200 Subject: [PATCH] chore: fix liniting issues --- .../agents/__tests__/agents-manager.backups.test.ts | 12 +++++++----- apps/agent/src/volume-host/backends/directory.ts | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/server/modules/agents/__tests__/agents-manager.backups.test.ts b/app/server/modules/agents/__tests__/agents-manager.backups.test.ts index 1718cbcf..053dfed2 100644 --- a/app/server/modules/agents/__tests__/agents-manager.backups.test.ts +++ b/app/server/modules/agents/__tests__/agents-manager.backups.test.ts @@ -48,11 +48,13 @@ test("cancelBackup resolves a running backup when the cancel command cannot be d }); test("runVolumeCommand sends the command to the selected agent", async () => { - const runVolumeCommand = vi.fn().mockResolvedValue({ - commandId: "command-1", - status: "success", - command: { name: "volume.mount", result: { status: "mounted" } }, - }); + const runVolumeCommand = vi.fn(() => + Effect.succeed({ + commandId: "command-1", + status: "success", + command: { name: "volume.mount", result: { status: "mounted" } }, + }), + ); setAgentRuntime({ runVolumeCommand }); const command = fromPartial({ name: "volume.mount", volume: { agentId: "agent-1" } }); diff --git a/apps/agent/src/volume-host/backends/directory.ts b/apps/agent/src/volume-host/backends/directory.ts index 4033cc10..67151268 100644 --- a/apps/agent/src/volume-host/backends/directory.ts +++ b/apps/agent/src/volume-host/backends/directory.ts @@ -3,7 +3,7 @@ import { logger } from "@zerobyte/core/node"; import { toMessage } from "@zerobyte/core/utils"; import type { BackendConfig, VolumeBackend } from "../types"; -const mount = async (config: BackendConfig, volumePath: string) => { +const mount = async (config: BackendConfig) => { if (config.backend !== "directory") { return { status: "error" as const, error: "Invalid backend type" }; } @@ -45,8 +45,8 @@ const checkHealth = async (config: BackendConfig) => { } }; -export const makeDirectoryBackend = (config: BackendConfig, volumePath: string): VolumeBackend => ({ - mount: () => mount(config, volumePath), +export const makeDirectoryBackend = (config: BackendConfig, _: string): VolumeBackend => ({ + mount: () => mount(config), unmount, checkHealth: () => checkHealth(config), });