mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-30 13:03:20 +00:00
test(obsidian): integrate representative adaptive journeys
# Conflicts: # package.json # test/e2e-obsidian/README.md # test/e2e-obsidian/runner/setupUri.ts # test/e2e-obsidian/scripts/local-suite.ts # test/e2e-obsidian/scripts/run-focused.ts
This commit is contained in:
commit
9825ad29a8
6 files changed
+296
-4
No files matched your search
@@ -32,6 +32,7 @@ const testSteps: Step[] = [
|
||||
},
|
||||
{ name: "Object Storage upload", args: ["run", "test:e2e:obsidian:minio-upload"] },
|
||||
{ name: "Adaptive WebDAV workflow", args: ["run", "test:e2e:obsidian:adaptive-webdav"] },
|
||||
{ name: "Adaptive PostgREST workflow", args: ["run", "test:e2e:obsidian:adaptive-postgrest"] },
|
||||
{
|
||||
name: "Object Storage Setup URI workflow",
|
||||
args: ["run", "test:e2e:obsidian:object-storage-setup-uri-workflow"],
|
||||
@@ -49,11 +50,13 @@ const manageCouchDb = process.argv.includes("--manage-couchdb") || process.argv.
|
||||
const manageMinio = process.argv.includes("--manage-minio") || process.argv.includes("--manage-services");
|
||||
const manageP2P = process.argv.includes("--manage-p2p") || process.argv.includes("--manage-services");
|
||||
const manageWebDAV = process.argv.includes("--manage-webdav") || process.argv.includes("--manage-services");
|
||||
const managePostgREST = process.argv.includes("--manage-postgrest") || process.argv.includes("--manage-services");
|
||||
const keepServices = process.argv.includes("--keep-services");
|
||||
const keepCouchDb = keepServices || process.argv.includes("--keep-couchdb");
|
||||
const keepMinio = keepServices || process.argv.includes("--keep-minio");
|
||||
const keepP2P = keepServices || process.argv.includes("--keep-p2p");
|
||||
const keepWebDAV = keepServices || process.argv.includes("--keep-webdav");
|
||||
const keepPostgREST = keepServices || process.argv.includes("--keep-postgrest");
|
||||
|
||||
function npmBinary(): string {
|
||||
return process.platform === "win32" ? "npm.cmd" : "npm";
|
||||
@@ -116,11 +119,20 @@ async function stopManagedWebDAV(): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
async function stopManagedPostgREST(): Promise<void> {
|
||||
await runStep({
|
||||
name: "stop PostgREST fixture",
|
||||
args: ["run", "test:docker-postgrest:stop"],
|
||||
optional: true,
|
||||
});
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
let shouldStopCouchDb = false;
|
||||
let shouldStopMinio = false;
|
||||
let shouldStopP2P = false;
|
||||
let shouldStopWebDAV = false;
|
||||
let shouldStopPostgREST = false;
|
||||
try {
|
||||
if (manageCouchDb) {
|
||||
await stopManagedCouchDb();
|
||||
@@ -142,11 +154,19 @@ async function main(): Promise<void> {
|
||||
await runStep({ name: "start WebDAV fixture", args: ["run", "test:docker-webdav:start"] });
|
||||
shouldStopWebDAV = !keepWebDAV;
|
||||
}
|
||||
if (managePostgREST) {
|
||||
await stopManagedPostgREST();
|
||||
await runStep({ name: "start PostgREST fixture", args: ["run", "test:docker-postgrest:start"] });
|
||||
shouldStopPostgREST = !keepPostgREST;
|
||||
}
|
||||
|
||||
for (const step of testSteps) {
|
||||
await runStep(step);
|
||||
}
|
||||
} finally {
|
||||
if (shouldStopPostgREST) {
|
||||
await stopManagedPostgREST();
|
||||
}
|
||||
if (shouldStopWebDAV) {
|
||||
await stopManagedWebDAV();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user