Skip to content

Commit

Permalink
test: name length e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Aug 29, 2024
1 parent 44a7281 commit 39e932b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
12 changes: 10 additions & 2 deletions libs/backend-api7/e2e/misc.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,6 +44,7 @@ describe('Miscellaneous', () => {
},
],
},
routes: [route],
} as ADCSDK.Service;

it('Create services', async () =>
Expand All @@ -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 () =>
Expand Down

0 comments on commit 39e932b

Please sign in to comment.