chore: fix liniting issues

This commit is contained in:
Nicolas Meienberger 2026-05-06 21:19:57 +02:00 committed by Nico
parent 4074a505b1
commit 6b83864158
2 changed files with 10 additions and 8 deletions

View file

@ -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<VolumeCommand>({ name: "volume.mount", volume: { agentId: "agent-1" } });

View file

@ -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),
});