From 27fea05369f5a28b89fe0a2da1e9285939061007 Mon Sep 17 00:00:00 2001 From: Oksana Grishchenko Date: Fri, 9 Feb 2024 15:57:27 +0200 Subject: [PATCH] targetNamespaces array --- api-tests/tests/backup-storages.spec.ts | 16 ++++++++-------- api-tests/tests/monitoring-instances.spec.ts | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/api-tests/tests/backup-storages.spec.ts b/api-tests/tests/backup-storages.spec.ts index 55f6c0c1..49a2c5f6 100644 --- a/api-tests/tests/backup-storages.spec.ts +++ b/api-tests/tests/backup-storages.spec.ts @@ -25,7 +25,7 @@ test('add/list/get/delete s3 backup storage success', async ({request}) => { region: 'us-east-2', accessKey: 'sdfs', secretKey: 'sdfsdfsd', - targetNamespaces: testsNs + targetNamespaces: [testsNs] } const response = await request.post(`/v1/backup-storages`, { @@ -65,7 +65,7 @@ test('add/list/get/delete s3 backup storage success', async ({request}) => { bucketName: 'percona-test-backup-storage1', accessKey: 'otherAccessKey', secretKey: 'otherSecret', - targetNamespaces: testsNs + targetNamespaces: [testsNs] } const updated = await request.patch(`/v1/backup-storages/${name}`, { data: updatePayload, @@ -100,7 +100,7 @@ test('add/list/get/delete azure backup storage success', async ({request}) => { bucketName: 'percona-test-backup-storage', accessKey: 'sdfs', secretKey: 'sdfsdfsd', - targetNamespaces: testsNs + targetNamespaces: [testsNs] } const response = await request.post(`/v1/backup-storages`, { @@ -186,7 +186,7 @@ test('create backup storage failures', async ({request}) => { region: 'us-east-2', accessKey: 'ssdssd', secretKey: 'ssdssdssdssd', - targetNamespaces: testsNs + targetNamespaces: [testsNs] }, errorText: '\'name\' is not RFC 1035 compatible', }, @@ -199,7 +199,7 @@ test('create backup storage failures', async ({request}) => { region: 'us-east-2', accessKey: 'ssdssd', secretKey: 'ssdssdssdssd', - targetNamespaces: testsNs + targetNamespaces: [testsNs] }, errorText: '\'url\' is an invalid URL', }, @@ -210,7 +210,7 @@ test('create backup storage failures', async ({request}) => { bucketName: 'invalid', accessKey: 'ssdssd', secretKey: 'ssdssdssdssd', - targetNamespaces: testsNs + targetNamespaces: [testsNs] }, errorText: 'Region is required', }, @@ -222,7 +222,7 @@ test('create backup storage failures', async ({request}) => { bucketName: 'invalid', accessKey: 'ssdssd', secretKey: 'ssdssdssdssd', - targetNamespaces: testsNs + targetNamespaces: [testsNs] }, errorText: '"/type": value is not one of the allowed values', }, @@ -246,7 +246,7 @@ test('update backup storage failures', async ({request}) => { region: 'us-east-2', accessKey: 'sdfsdfs', secretKey: 'lkdfslsldfka', - targetNamespaces: testsNs + targetNamespaces: [testsNs] } const response = await request.post(`/v1/backup-storages`, { data: createPayload, diff --git a/api-tests/tests/monitoring-instances.spec.ts b/api-tests/tests/monitoring-instances.spec.ts index b845c593..0e5f0829 100644 --- a/api-tests/tests/monitoring-instances.spec.ts +++ b/api-tests/tests/monitoring-instances.spec.ts @@ -39,7 +39,7 @@ test('create monitoring instance with api key', async ({ request }) => { type: 'pmm', name: `${testPrefix}-key`, url: 'http://monitoring', - targetNamespaces: testsNs, + targetNamespaces: [testsNs], pmm: { apiKey: '123', }, @@ -60,7 +60,7 @@ test('create monitoring instance with user/password', async ({ request }) => { type: 'pmm', name: `${testPrefix}-pass`, url: 'http://127.0.0.1:8888', - targetNamespaces: testsNs, + targetNamespaces: [testsNs], pmm: { user: 'admin', password: 'admin', @@ -82,7 +82,7 @@ test('create monitoring instance missing pmm', async ({ request }) => { type: 'pmm', name: 'monitoring-fail', url: 'http://monitoring-instance', - targetNamespaces: testsNs, + targetNamespaces: [testsNs], } const response = await request.post('/v1/monitoring-instances', { data }) @@ -95,7 +95,7 @@ test('create monitoring instance missing pmm credentials', async ({ request }) = type: 'pmm', name: 'monitoring-fail', url: 'http://monitoring-instance', - targetNamespaces: testsNs, + targetNamespaces: [testsNs], pmm: {}, } @@ -244,7 +244,7 @@ test('update monitoring instances failures', async ({ request }) => { type: 'pmm', name: `${testPrefix}-fail`, url: 'http://monitoring', - targetNamespaces: testsNs, + targetNamespaces: [testsNs], pmm: { apiKey: '123', }, @@ -301,7 +301,7 @@ async function createInstances(request: APIRequestContext, namePrefix: string, c type: 'pmm', name: '', url: 'http://monitoring-instance', - targetNamespaces: testsNs, + targetNamespaces: [testsNs], pmm: { apiKey: '123', },