updates to integration tests

This commit is contained in:
ben committed 2026-10-24 14:26:05 +00:00
1 parent f5893a107d
commit 54fe77415b
2 files changed
+10 -8

No files matched your search

+5 -4
View File
@@ -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();
+5 -4
View File
@@ -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();