diff --git a/tests/docker_persist_test.ts b/tests/docker_persist_test.ts index 2273141..b8ba396 100644 --- a/tests/docker_persist_test.ts +++ b/tests/docker_persist_test.ts @@ -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`; diff --git a/tests/readme_quick_start_test.ts b/tests/readme_quick_start_test.ts index 70b94b9..eaa8de5 100644 --- a/tests/readme_quick_start_test.ts +++ b/tests/readme_quick_start_test.ts @@ -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)", + ); + }, +); +