24 lines
833 B
TypeScript
24 lines
833 B
TypeScript
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
|
import { bootTwoInstances, type TwoInstanceHarness } from './helpers/twoInstanceHarness.js';
|
|
import { peerInstances } from './helpers/seedPeer.js';
|
|
|
|
let harness: TwoInstanceHarness;
|
|
let sharedHmacSecret: string;
|
|
|
|
beforeAll(async () => {
|
|
harness = await bootTwoInstances();
|
|
sharedHmacSecret = await peerInstances(harness.home, harness.remote);
|
|
}, 60_000);
|
|
|
|
afterAll(async () => {
|
|
if (harness) await harness.cleanup();
|
|
});
|
|
|
|
describe('Federation identity deletion — server suite', () => {
|
|
it('boots the harness and peers the two instances', async () => {
|
|
expect(harness.home.origin).toMatch(/^http:\/\/127\.0\.0\.1:\d+$/);
|
|
expect(harness.remote.origin).toMatch(/^http:\/\/127\.0\.0\.1:\d+$/);
|
|
expect(sharedHmacSecret).toHaveLength(64);
|
|
});
|
|
});
|