This commit is contained in:
Andras Schmelczer 2026-09-26 20:22:16 +01:00
commit b07aa589ff

View file

@ -6,7 +6,7 @@ import {
import { Settings } from "../sync-client/src/persistence/settings";
import { FileOperations } from "../sync-client/src/file-operations/file-operations";
import { Syncer } from "../sync-client/src/sync-operations/syncer";
import { toStoredSnapshot } from "../sync-client/src/sync-operations/content";
import { toStoredSnapshot } from "../sync-client/src/snapshot";
import { Logger } from "../sync-client/src/tracing/logger";
import { SyncHistory } from "../sync-client/src/tracing/sync-history";
import { FixedSizeDocumentCache } from "../sync-client/src/utils/data-structures/fix-sized-cache";
@ -37,13 +37,13 @@ export async function fixture(
? (recovered.persistence.snapshot().database as StoredDatabase)
: emptyState("test");
if (!recovered) {
initial.initialized = true;
initial.lastSeenUpdateId = 0;
for (const [path, content] of Object.entries(contents)) {
await disk.userWrite(path, bytes(content));
const id = path.split(".")[0];
initial.local[id] = path;
initial.documents[id] = {
materialized: true,
observedHash: (
await toStoredSnapshot({ content: bytes(content) })
).hash
@ -110,11 +110,10 @@ export async function fixture(
batch: import("../sync-client/src/services/types/EventBatch").EventBatch
) => Promise<void>;
stopped: boolean;
incorporateFileManifest: (remote: {
reconcile: (remote: {
fileManifestId: number;
entries: Record<string, string>;
}) => Promise<void>;
incorporateContent: (remote: ReturnType<typeof head>) => Promise<void>;
};
return {
disk,