From 2afbc768179cd7609b0989166bca836779492f6d Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Mon, 15 Sep 2025 20:58:47 +0200 Subject: [PATCH] Fix jwt-token --- .../tests/middleware/ip-restriction.test.js | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/server/tests/middleware/ip-restriction.test.js b/server/tests/middleware/ip-restriction.test.js index 6937f3a..85095b2 100644 --- a/server/tests/middleware/ip-restriction.test.js +++ b/server/tests/middleware/ip-restriction.test.js @@ -26,7 +26,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: false, - allowed_ips: '192.168.1.1,10.0.0.1' + ip_whitelist: '192.168.1.1,10.0.0.1' }); const req = mockRequest({ @@ -45,7 +45,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '192.168.1.1,10.0.0.1,127.0.0.1' + ip_whitelist: '192.168.1.1,10.0.0.1,127.0.0.1' }); const req = mockRequest({ @@ -64,7 +64,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '192.168.1.1,10.0.0.1' + ip_whitelist: '192.168.1.1,10.0.0.1' }); const req = mockRequest({ @@ -101,7 +101,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '203.0.113.1' + ip_whitelist: '203.0.113.1' }); const req = mockRequest({ @@ -121,7 +121,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '203.0.113.2' + ip_whitelist: '203.0.113.2' }); const req = mockRequest({ @@ -141,7 +141,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '192.168.1.0/24,10.0.0.0/8' + ip_whitelist: '192.168.1.0/24,10.0.0.0/8' }); const req = mockRequest({ @@ -160,7 +160,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '192.168.1.0/24' + ip_whitelist: '192.168.1.0/24' }); const req = mockRequest({ @@ -179,7 +179,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '192.168.1.1' + ip_whitelist: '192.168.1.1' }); const dockerIPs = ['172.17.0.1', '172.18.0.1', '172.19.0.1']; @@ -224,11 +224,11 @@ describe('IP Restriction Middleware', () => { } }); - it('should handle empty allowed_ips list', async () => { + it('should handle empty ip_whitelist', async () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '' + ip_whitelist: '' }); const req = mockRequest({ @@ -243,11 +243,11 @@ describe('IP Restriction Middleware', () => { expect(res.statusCode).to.equal(403); }); - it('should handle null allowed_ips', async () => { + it('should handle null ip_whitelist', async () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: null + ip_whitelist: null }); const req = mockRequest({ @@ -268,7 +268,7 @@ describe('IP Restriction Middleware', () => { const tenant = await createTestTenant({ slug: 'test-tenant', ip_restriction_enabled: true, - allowed_ips: '192.168.1.1' + ip_whitelist: '192.168.1.1' }); const req = mockRequest({