Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/docker_persist_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,16 @@ Deno.test({

const documented = readmePersistCommand();
assertStringIncludes(documented, "--persist");
assert(
!documented.includes("/mnt"),
"README persistence command must not reference /mnt (#174)",
);
const persistDir = envValue(documented, "PERSIST").replace(/\/+$/, "");
assert(persistDir.length > 0, "README persistence command does not set PERSIST");
assertEquals(
persistDir,
"/data",
"README persistence command must configure PERSIST=/data/ (#174)",
);

const name = `queue-persist-test-${Date.now()}`;
const volume = `${name}-data`;
Expand Down
21 changes: 21 additions & 0 deletions tests/readme_quick_start_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,24 @@ Deno.test("README quick start documents authenticated, reachable commands", () =
assertStringIncludes(command, "Authorization: Bearer");
}
});

Deno.test(
"README persistence section documents writable Docker data path (#174)",
() => {
const persistSection =
README.match(/## Persistency([\s\S]*?)(\n## |$)/)?.[1] ?? "";
const persistBlocks = codeBlocks(persistSection);
const dockerPersist =
persistBlocks.find((block) => block.includes("docker run")) ?? "";
assert(
dockerPersist.length > 0,
"README Persistency section is missing a Docker run command",
);
assertStringIncludes(dockerPersist, "PERSIST=/data/");
assert(
!dockerPersist.includes("/mnt"),
"README persistence command must not reference /mnt (#174)",
);
},
);

Loading