From 39e932bc9c97c9d9db3a3bbf8aeb66bde1fcbeb4 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Thu, 29 Aug 2024 15:34:25 +0800 Subject: [PATCH] test: name length e2e --- .github/workflows/e2e.yaml | 2 +- libs/backend-api7/e2e/misc.e2e-spec.ts | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 6d688a6..f55fc22 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -39,7 +39,7 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'test/api7') || github.event_name == 'push' strategy: matrix: - version: [3.2.13.0, 3.2.14.5] + version: [3.2.13.0, 3.2.14.6] env: BACKEND_API7_DOWNLOAD_URL: https://run.api7.ai/api7-ee/api7-ee-v${{ matrix.version }}.tar.gz BACKEND_API7_LICENSE: ${{ secrets.BACKEND_API7_LICENSE }} diff --git a/libs/backend-api7/e2e/misc.e2e-spec.ts b/libs/backend-api7/e2e/misc.e2e-spec.ts index 877deec..c95919c 100644 --- a/libs/backend-api7/e2e/misc.e2e-spec.ts +++ b/libs/backend-api7/e2e/misc.e2e-spec.ts @@ -24,8 +24,13 @@ describe('Miscellaneous', () => { }); }); - describe('Sync resources with the description greater than 256 bytes', () => { - const service1Name = 'service1'; + describe('Sync resources with the name/description greater than 256 bytes', () => { + const routeName = ''.padEnd(64 * 1024, '0'); // 65536 bytes + const service1Name = ''.padEnd(64 * 1024, '0'); // 65536 bytes + const route = { + name: routeName, + uris: ['/test'], + }; const service1 = { name: service1Name, description: ''.padEnd(64 * 1024, '0'), // 65536 bytes @@ -39,6 +44,7 @@ describe('Miscellaneous', () => { }, ], }, + routes: [route], } as ADCSDK.Service; it('Create services', async () => @@ -50,6 +56,8 @@ describe('Miscellaneous', () => { const result = (await dumpConfiguration(backend)) as ADCSDK.Configuration; expect(result.services).toHaveLength(1); expect(result.services[0]).toMatchObject(service1); + expect(result.services[0]).toMatchObject(service1); + expect(result.services[0].routes[0]).toMatchObject(route); }); it('Delete service', async () =>