mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-09-01 16:27:07 +00:00
test(cli): focus adaptive PostgREST on consumer behaviour
This commit is contained in:
@@ -9,12 +9,7 @@ import {
|
|||||||
sanitiseCatStdout,
|
sanitiseCatStdout,
|
||||||
} from "./helpers/cli.ts";
|
} from "./helpers/cli.ts";
|
||||||
import { applyRemoteSyncSettings, generateSetupUriFromSettings, initSettingsFile } from "./helpers/settings.ts";
|
import { applyRemoteSyncSettings, generateSetupUriFromSettings, initSettingsFile } from "./helpers/settings.ts";
|
||||||
import {
|
import { type PostgRESTFixture, startPostgREST, stopPostgREST } from "./helpers/docker.ts";
|
||||||
type PostgRESTFixture,
|
|
||||||
readPostgRESTAdaptiveRowCounts,
|
|
||||||
startPostgREST,
|
|
||||||
stopPostgREST,
|
|
||||||
} from "./helpers/docker.ts";
|
|
||||||
|
|
||||||
const BINARY_TEST_BYTES = 2 * 1024 * 1024;
|
const BINARY_TEST_BYTES = 2 * 1024 * 1024;
|
||||||
|
|
||||||
@@ -187,14 +182,6 @@ Deno.test("e2e: two CLI vaults synchronise through Adaptive Journal PostgREST",
|
|||||||
typeof status.estimatedSize === "number" && status.estimatedSize > 0,
|
typeof status.estimatedSize === "number" && status.estimatedSize > 0,
|
||||||
`PostgREST remote status did not report a positive size: ${JSON.stringify(status)}`
|
`PostgREST remote status did not report a positive size: ${JSON.stringify(status)}`
|
||||||
);
|
);
|
||||||
|
|
||||||
if (shouldStartDocker) {
|
|
||||||
const counts = await readPostgRESTAdaptiveRowCounts(fixture.vaultId);
|
|
||||||
assertEquals(counts.manifests, 1);
|
|
||||||
assert(counts.chunks > 0, `PostgREST did not persist Chunk rows: ${JSON.stringify(counts)}`);
|
|
||||||
assert(counts.writers >= 2, `PostgREST did not preserve both Writer streams: ${JSON.stringify(counts)}`);
|
|
||||||
assert(counts.commits >= 2, `PostgREST did not persist Commit Bundles: ${JSON.stringify(counts)}`);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
if (shouldStartDocker && !keepDocker) {
|
if (shouldStartDocker && !keepDocker) {
|
||||||
await stopPostgREST().catch(() => {});
|
await stopPostgREST().catch(() => {});
|
||||||
|
|||||||
Reference in New Issue
Block a user