Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-01-13 08:57:08 +00:00
parent 5e9066ec8c
commit c8e46251f5
2 changed files with 7 additions and 5 deletions

View File

@@ -91,10 +91,12 @@ test.use({
},
},
},
credentials: async ({ context, homeserver }, use) => {
context: async ({ context, homeserver }, use) => {
// Restart the homeserver to wipe its in-memory db so we can reuse the same user ID without cross-signing prompts
await homeserver.restart();
await use(context);
},
credentials: async ({ context, homeserver }, use) => {
const displayName = "Dave";
const credentials = await homeserver.registerUser(username, password, displayName);
console.log(`Registered test user @user:localhost with displayname ${displayName}`);

View File

@@ -81,10 +81,10 @@ const test = base.extend<{
});
await use({ name, roomId });
},
credentials: async ({ credentials, homeserver }, use) => {
// Restart the homeserver to wipe its in-memory db so we can purge the user_directory of users
context: async ({ context, homeserver }, use) => {
// Restart the homeserver to wipe its in-memory db so we can reuse the same user ID without cross-signing prompts
await homeserver.restart();
await use(credentials);
await use(context);
},
});