mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
ci: Playwright project organization (#17905)
This commit is contained in:
22
packages/testing/playwright/tests/chaos/multimain.spec.ts
Normal file
22
packages/testing/playwright/tests/chaos/multimain.spec.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { test, expect } from '../../fixtures/base';
|
||||
|
||||
test('Leader election @mode:multi-main @chaostest', async ({ chaos }) => {
|
||||
// First get the container (try main 1 first)
|
||||
const namePattern = 'n8n-main-*';
|
||||
|
||||
const findContainerByLog = await chaos.waitForLog('Leader is now this', {
|
||||
namePattern,
|
||||
});
|
||||
|
||||
expect(findContainerByLog).toBeDefined();
|
||||
const currentLeader = findContainerByLog.containerName;
|
||||
// Stop leader
|
||||
await chaos.stopContainer(currentLeader);
|
||||
|
||||
// Find new leader
|
||||
const newLeader = await chaos.waitForLog('Leader is now this', {
|
||||
namePattern,
|
||||
});
|
||||
|
||||
expect(newLeader).toBeDefined();
|
||||
});
|
||||
Reference in New Issue
Block a user