1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-31 13:44:28 +03:00

Attach synapse logs to failed Playwright test runs (#12027)

* Attach synapse logs to failed Playwright test runs

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update playwright/plugins/homeserver/index.ts

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2023-12-14 13:49:35 +00:00
committed by GitHub
parent 18f11b8024
commit d5a211c774
4 changed files with 24 additions and 5 deletions

View File

@ -81,7 +81,7 @@ export class Dendrite extends Synapse implements Homeserver, HomeserverInstance
return this;
}
public async stop(): Promise<void> {
public async stop(): Promise<string[]> {
if (!this.config) throw new Error("Missing existing dendrite instance, did you call stop() before start()?");
const dendriteLogsPath = path.join("playwright", "dendritelogs", this.config.serverId);
@ -97,6 +97,8 @@ export class Dendrite extends Synapse implements Homeserver, HomeserverInstance
await fse.remove(this.config.configDir);
console.log(`Stopped dendrite id ${this.config.serverId}.`);
return [path.join(dendriteLogsPath, "stdout.log"), path.join(dendriteLogsPath, "stderr.log")];
}
}