From 54fe77415b9a6529eccfc0174db3b51c33a7e3f2 Mon Sep 17 00:00:00 2001 From: JlincFM Date: Sat, 24 Oct 2026 14:26:05 +0000 Subject: [PATCH] updates to integration tests --- src/integration/integration.test.js | 9 +++++---- src/integration/integration.test.ts | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/integration/integration.test.js b/src/integration/integration.test.js index 4224328..7f49f6e 100644 --- a/src/integration/integration.test.js +++ b/src/integration/integration.test.js @@ -17,7 +17,6 @@ let agreement; beforeAll(async () => { const domains = await jlinc.getDomains({ - fedidUrl: 'http://localhost:8881', auth: { subject: { type: 'user', id: 'tester' }, action: { name: 'read' }, @@ -27,12 +26,10 @@ beforeAll(async () => { domain = domains[0]; provider = await jlinc.createEntity({ - fedidUrl: 'http://localhost:8881', shortName: `provider-integ-${Date.now()}@${domain}`, }); user = await jlinc.createEntity({ - fedidUrl: 'http://localhost:8881', shortName: `user-integ-${Date.now()}@${domain}`, }); @@ -80,7 +77,6 @@ describe('JLINC API Integration Tests', () => { describe('domains', () => { it('should get available domains', async () => { const domains = await jlinc.getDomains({ - fedidUrl: 'http://localhost:8881', auth: { subject: { type: 'user', id: 'tester' }, action: { name: 'read' }, @@ -204,6 +200,11 @@ describe('JLINC API Integration Tests', () => { }); describe('audit', () => { + beforeAll(async () => { + if (process.env.JLINC_AUDIT_SLEEP == 'true') { + await new Promise((resolve) => setTimeout(resolve, 120000)); + } + }, 125000); it('should get agreement audits', async () => { const result = await jlinc.getAudits({ agreementId }); expect(result).toBeDefined(); diff --git a/src/integration/integration.test.ts b/src/integration/integration.test.ts index 9e4f24d..5edc8e5 100644 --- a/src/integration/integration.test.ts +++ b/src/integration/integration.test.ts @@ -17,7 +17,6 @@ let agreement: any; beforeAll(async () => { const domains = await jlinc.getDomains({ - fedidUrl: 'http://localhost:8881', auth: { subject: { type: 'user', id: 'tester' }, action: { name: 'read' }, @@ -27,12 +26,10 @@ beforeAll(async () => { domain = domains[0]; provider = await jlinc.createEntity({ - fedidUrl: 'http://localhost:8881', shortName: `provider-integ-${Date.now()}@${domain}`, }); user = await jlinc.createEntity({ - fedidUrl: 'http://localhost:8881', shortName: `user-integ-${Date.now()}@${domain}`, }); @@ -80,7 +77,6 @@ describe('JLINC API Integration Tests', () => { describe('domains', () => { it('should get available domains', async () => { const domains = await jlinc.getDomains({ - fedidUrl: 'http://localhost:8881', auth: { subject: { type: 'user', id: 'tester' }, action: { name: 'read' }, @@ -202,6 +198,11 @@ describe('JLINC API Integration Tests', () => { }); describe('audit', () => { + beforeAll(async () => { + if (process.env.JLINC_AUDIT_SLEEP == 'true') { + await new Promise((resolve) => setTimeout(resolve, 120000)); + } + }, 125000); it('should get agreement audits', async () => { const result = await jlinc.getAudits({ agreementId }); expect(result).toBeDefined();