Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Update log path
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Feb 20, 2024
1 parent 6601501 commit effef3d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ to be left with some stray containers if, for example, you terminate a test such
that the `after()` does not run and also exit Playwright uncleanly. All the containers
it starts are prefixed, so they are easy to recognise. They can be removed safely.

After each test run, logs from the Synapse instances are saved in `playwright/synapselogs`
After each test run, logs from the Synapse instances are saved in `playwright/logs/synapse`
with each instance in a separate directory named after its ID. These logs are removed
at the start of each test run.

Expand Down
3 changes: 1 addition & 2 deletions playwright/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/test-results/
/html-report/
/synapselogs/
/maslogs/
/logs/
# Only commit snapshots from Linux
/snapshots/**/*.png
!/snapshots/**/*-linux.png
2 changes: 1 addition & 1 deletion playwright/plugins/homeserver/synapse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class Synapse implements Homeserver, HomeserverInstance {
public async stop(): Promise<string[]> {
if (!this.config) throw new Error("Missing existing synapse instance, did you call stop() before start()?");
const id = this.config.serverId;
const synapseLogsPath = path.join("playwright", "synapselogs", id);
const synapseLogsPath = path.join("playwright", "logs", "synapse", id);
await fse.ensureDir(synapseLogsPath);
await this.docker.persistLogsToFile({
stdoutFile: path.join(synapseLogsPath, "stdout.log"),
Expand Down
2 changes: 1 addition & 1 deletion playwright/plugins/matrix-authentication-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class MatrixAuthenticationService {
async stop(testInfo: TestInfo): Promise<void> {
if (!this.instance) return; // nothing to stop
const id = this.instance.containerId;
const logPath = path.join("playwright", "maslogs", id);
const logPath = path.join("playwright", "logs", "matrix-authentication-service", id);
await fse.ensureDir(logPath);
await this.masDocker.persistLogsToFile({
stdoutFile: path.join(logPath, "stdout.log"),
Expand Down

0 comments on commit effef3d

Please sign in to comment.