Fix E2E tests

This commit is contained in:
Andras Schmelczer 2025-04-06 13:55:27 +01:00
parent 29ff601545
commit f8b0501eea
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 5 additions and 30 deletions

View file

@ -274,9 +274,8 @@ export class Syncer {
typeof globalThis !== "undefined" &&
typeof globalThis.WebSocket === "undefined"
) {
// polyfill for WebSocket in Node.js
// eslint-disable-next-line
globalThis.WebSocket = require("ws");
globalThis.WebSocket = require("ws"); // polyfill for WebSocket in Node.js
}
this.applyRemoteChangesWebSocket = new WebSocket(wsUri);

View file

@ -108,7 +108,7 @@ export class MockClient implements FileSystemOperations {
{
assert(
newParts.includes(part),
`Part ${part} not found in new content`
`Part ${part} not found in new content: ${newContent}`
);
}
);

View file

@ -25,10 +25,12 @@ async function runTest({
const settings = `with ${agentCount} agents, concurrency ${concurrency}, iterations ${iterations}, doDeletes ${doDeletes}, jitterScaleInSeconds ${jitterScaleInSeconds}, useSlowFileEvents ${useSlowFileEvents}`;
console.info(`Running test ${settings}`);
const vaultName = uuidv4();
console.info(`Using vault name: ${vaultName}`);
const initialSettings: Partial<SyncSettings> = {
isSyncEnabled: true,
token: "test-token-change-me", // same as in backend/config-e2e.yml
vaultName: uuidv4(),
vaultName,
syncConcurrency: concurrency,
remoteUri: "http://localhost:3000"
};