From 12c865525daf9dce509004a811d439ce9c2c7970 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Tue, 4 Oct 2022 13:53:40 -0400 Subject: [PATCH 1/4] synthetics - bump bundled package to 0.10.3 --- fleet_packages.json | 4 +-- .../rest/add_monitor_private_location.ts | 2 +- .../apis/uptime/rest/add_monitor_project.ts | 31 +++++++------------ .../apis/uptime/rest/delete_monitor.ts | 2 +- .../uptime/rest/sample_data/test_policy.ts | 14 ++++----- 5 files changed, 23 insertions(+), 30 deletions(-) diff --git a/fleet_packages.json b/fleet_packages.json index 4651e86287588..94d383ff9f6e6 100644 --- a/fleet_packages.json +++ b/fleet_packages.json @@ -37,6 +37,6 @@ }, { "name": "synthetics", - "version": "0.10.2" + "version": "0.10.3" } -] \ No newline at end of file +] diff --git a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_private_location.ts b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_private_location.ts index 826190b73385f..12ef5ac975406 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_private_location.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_private_location.ts @@ -35,7 +35,7 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await supertestAPI.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertestAPI - .post('/api/fleet/epm/packages/synthetics/0.10.2') + .post('/api/fleet/epm/packages/synthetics/0.10.3') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); diff --git a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts index 75361d7ae213e..392b96b8fef4c 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts @@ -79,7 +79,7 @@ export default function ({ getService }: FtrProviderContext) { before(async () => { await supertest.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertest - .post('/api/fleet/epm/packages/synthetics/0.10.2') + .post('/api/fleet/epm/packages/synthetics/0.10.3') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); @@ -1441,8 +1441,7 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${ - monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); expect(packagePolicy.name).eql( @@ -1500,8 +1499,7 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${ - monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1522,8 +1520,7 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${ - monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1560,8 +1557,7 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${ - monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1595,8 +1591,7 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${ - monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1640,8 +1635,8 @@ export default function ({ getService }: FtrProviderContext) { (pkgPolicy: PackagePolicy) => pkgPolicy.id === monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + - '-' + - testPolicyId + '-' + + testPolicyId ); expect(packagePolicy.policy_id).eql(testPolicyId); @@ -1690,8 +1685,8 @@ export default function ({ getService }: FtrProviderContext) { (pkgPolicy: PackagePolicy) => pkgPolicy.id === monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + - '-' + - testPolicyId + '-' + + testPolicyId ); expect(packagePolicy2).eql(undefined); @@ -1733,8 +1728,7 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${ - monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1852,8 +1846,7 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${ - monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] } - ${testPolicyId}` ); diff --git a/x-pack/test/api_integration/apis/uptime/rest/delete_monitor.ts b/x-pack/test/api_integration/apis/uptime/rest/delete_monitor.ts index 37536c329cbb6..b9fd0fac8ac2a 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/delete_monitor.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/delete_monitor.ts @@ -41,7 +41,7 @@ export default function ({ getService }: FtrProviderContext) { _httpMonitorJson = getFixtureJson('http_monitor'); await supertest.post('/api/fleet/setup').set('kbn-xsrf', 'true').send().expect(200); await supertest - .post('/api/fleet/epm/packages/synthetics/0.10.2') + .post('/api/fleet/epm/packages/synthetics/0.10.3') .set('kbn-xsrf', 'true') .send({ force: true }) .expect(200); diff --git a/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts b/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts index ed9fa70ab4f59..aafc4762ca251 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts @@ -19,7 +19,7 @@ export const getTestSyntheticsPolicy = ( version: 'WzE2MjYsMV0=', name: 'test-monitor-name-Test private location 0-default', namespace: namespace || 'testnamespace', - package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.10.2' }, + package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.10.3' }, enabled: true, policy_id: '5347cd10-0368-11ed-8df7-a7424c6f5167', inputs: [ @@ -302,17 +302,17 @@ export const getTestProjectSyntheticsPolicy = ( configId: string; id: string; } = { - name: 'check if title is present-Test private location 0', - inputs: {}, - configId: '', - id: '', - } + name: 'check if title is present-Test private location 0', + inputs: {}, + configId: '', + id: '', + } ): PackagePolicy => ({ id: '4b6abc6c-118b-4d93-a489-1135500d09f1-test-suite-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3', version: 'WzEzMDksMV0=', name: '4b6abc6c-118b-4d93-a489-1135500d09f1-test-suite-default-Test private location 0', namespace: 'default', - package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.10.2' }, + package: { name: 'synthetics', title: 'Elastic Synthetics', version: '0.10.3' }, enabled: true, policy_id: '46034710-0ba6-11ed-ba04-5f123b9faa8b', inputs: [ From 8f5324e8be710e1335a98bbd7897a254920d203b Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 4 Oct 2022 18:05:43 +0000 Subject: [PATCH 2/4] [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' --- .../apis/uptime/rest/add_monitor_project.ts | 29 ++++++++++++------- .../uptime/rest/sample_data/test_policy.ts | 10 +++---- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts index 392b96b8fef4c..9ce796123e0b4 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts @@ -1441,7 +1441,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); expect(packagePolicy.name).eql( @@ -1499,7 +1500,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1520,7 +1522,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1557,7 +1560,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1591,7 +1595,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1635,8 +1640,8 @@ export default function ({ getService }: FtrProviderContext) { (pkgPolicy: PackagePolicy) => pkgPolicy.id === monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + - '-' + - testPolicyId + '-' + + testPolicyId ); expect(packagePolicy.policy_id).eql(testPolicyId); @@ -1685,8 +1690,8 @@ export default function ({ getService }: FtrProviderContext) { (pkgPolicy: PackagePolicy) => pkgPolicy.id === monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + - '-' + - testPolicyId + '-' + + testPolicyId ); expect(packagePolicy2).eql(undefined); @@ -1728,7 +1733,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1846,7 +1852,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] } - ${testPolicyId}` ); diff --git a/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts b/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts index aafc4762ca251..69892f648a53f 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts @@ -302,11 +302,11 @@ export const getTestProjectSyntheticsPolicy = ( configId: string; id: string; } = { - name: 'check if title is present-Test private location 0', - inputs: {}, - configId: '', - id: '', - } + name: 'check if title is present-Test private location 0', + inputs: {}, + configId: '', + id: '', + } ): PackagePolicy => ({ id: '4b6abc6c-118b-4d93-a489-1135500d09f1-test-suite-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3', version: 'WzEzMDksMV0=', From a7eb8c47fc51b756f6b88a82a90172de9b864ae8 Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Wed, 5 Oct 2022 10:14:00 -0400 Subject: [PATCH 3/4] adjust tests --- .../apis/uptime/rest/add_monitor_project.ts | 44 +++++++++++++------ .../uptime/rest/sample_data/test_policy.ts | 22 +++++++--- 2 files changed, 47 insertions(+), 19 deletions(-) diff --git a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts index 392b96b8fef4c..1ea0f14dad44a 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts @@ -19,8 +19,7 @@ import { PrivateLocationTestService } from './services/private_location_test_ser import { comparePolicies, getTestProjectSyntheticsPolicy } from './sample_data/test_policy'; export default function ({ getService }: FtrProviderContext) { - // FLAKY: https://github.com/elastic/kibana/issues/142110 - describe.skip('AddProjectMonitors', function () { + describe('AddProjectMonitors', function () { this.tags('skipCloud'); const supertest = getService('supertest'); @@ -1441,7 +1440,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); expect(packagePolicy.name).eql( @@ -1499,7 +1499,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1520,7 +1521,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1557,7 +1559,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1591,7 +1594,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1635,8 +1639,8 @@ export default function ({ getService }: FtrProviderContext) { (pkgPolicy: PackagePolicy) => pkgPolicy.id === monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + - '-' + - testPolicyId + '-' + + testPolicyId ); expect(packagePolicy.policy_id).eql(testPolicyId); @@ -1685,8 +1689,8 @@ export default function ({ getService }: FtrProviderContext) { (pkgPolicy: PackagePolicy) => pkgPolicy.id === monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + - '-' + - testPolicyId + '-' + + testPolicyId ); expect(packagePolicy2).eql(undefined); @@ -1728,7 +1732,8 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy = apiResponsePolicy.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] }-${testPolicyId}` ); @@ -1792,6 +1797,14 @@ export default function ({ getService }: FtrProviderContext) { config_id: { value: configId, type: 'text' }, run_once: { value: false, type: 'bool' }, origin: { value: 'project', type: 'text' }, + 'monitor.project.id': { + type: 'text', + value: 'test-suite', + }, + 'monitor.project.name': { + type: 'text', + value: 'test-suite', + }, }, id: `synthetics/http-http-${id}-${testPolicyId}`, compiled_stream: { @@ -1822,6 +1835,8 @@ export default function ({ getService }: FtrProviderContext) { fields: { 'monitor.fleet_managed': true, config_id: configId, + 'monitor.project.id': 'test-suite', + 'monitor.project.name': 'test-suite', }, }, }, @@ -1846,13 +1861,14 @@ export default function ({ getService }: FtrProviderContext) { const packagePolicy2 = apiResponsePolicy2.body.items.find( (pkgPolicy: PackagePolicy) => pkgPolicy.id === - `${monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] + `${ + monitorsResponse.body.monitors[0].attributes[ConfigKey.CUSTOM_HEARTBEAT_ID] } - ${testPolicyId}` ); expect(packagePolicy2).eql(undefined); } finally { - await deleteMonitor(projectMonitors.monitors[0].id, projectMonitors.project); + await deleteMonitor(httpProjectMonitors.monitors[1].id, httpProjectMonitors.project); const apiResponsePolicy2 = await supertest.get( '/api/fleet/package_policies?page=1&perPage=2000&kuery=ingest-package-policies.package.name%3A%20synthetics' diff --git a/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts b/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts index aafc4762ca251..05bba2286e004 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/sample_data/test_policy.ts @@ -73,6 +73,8 @@ export const getTestSyntheticsPolicy = ( config_id: { value: id, type: 'text' }, run_once: { value: false, type: 'bool' }, origin: { value: 'ui', type: 'text' }, + 'monitor.project.id': { type: 'text', value: null }, + 'monitor.project.name': { type: 'text', value: null }, }, id: 'synthetics/http-http-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', compiled_stream: { @@ -158,6 +160,8 @@ export const getTestSyntheticsPolicy = ( config_id: { type: 'text' }, run_once: { value: false, type: 'bool' }, origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, }, id: 'synthetics/tcp-tcp-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', }, @@ -188,6 +192,8 @@ export const getTestSyntheticsPolicy = ( config_id: { type: 'text' }, run_once: { value: false, type: 'bool' }, origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, }, id: 'synthetics/icmp-icmp-2bfd7da0-22ed-11ed-8c6b-09a2d21dfbc3-27337270-22ed-11ed-8c6b-09a2d21dfbc3-default', }, @@ -302,11 +308,11 @@ export const getTestProjectSyntheticsPolicy = ( configId: string; id: string; } = { - name: 'check if title is present-Test private location 0', - inputs: {}, - configId: '', - id: '', - } + name: 'check if title is present-Test private location 0', + inputs: {}, + configId: '', + id: '', + } ): PackagePolicy => ({ id: '4b6abc6c-118b-4d93-a489-1135500d09f1-test-suite-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3', version: 'WzEzMDksMV0=', @@ -359,6 +365,8 @@ export const getTestProjectSyntheticsPolicy = ( config_id: { type: 'text' }, run_once: { value: false, type: 'bool' }, origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, }, id: 'synthetics/http-http-4b6abc6c-118b-4d93-a489-1135500d09f1-test-suite-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3', }, @@ -398,6 +406,8 @@ export const getTestProjectSyntheticsPolicy = ( config_id: { type: 'text' }, run_once: { value: false, type: 'bool' }, origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, }, id: 'synthetics/tcp-tcp-4b6abc6c-118b-4d93-a489-1135500d09f1-test-suite-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3', }, @@ -428,6 +438,8 @@ export const getTestProjectSyntheticsPolicy = ( config_id: { type: 'text' }, run_once: { value: false, type: 'bool' }, origin: { type: 'text' }, + 'monitor.project.id': { type: 'text' }, + 'monitor.project.name': { type: 'text' }, }, id: 'synthetics/icmp-icmp-4b6abc6c-118b-4d93-a489-1135500d09f1-test-suite-default-d70a46e0-22ea-11ed-8c6b-09a2d21dfbc3', }, From fb94c8768aa602cec5ef312d369810f5d6f7711b Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Wed, 5 Oct 2022 16:53:40 -0400 Subject: [PATCH 4/4] Update x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts --- .../api_integration/apis/uptime/rest/add_monitor_project.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts index 1ea0f14dad44a..9b0ae053566b2 100644 --- a/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts +++ b/x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts @@ -19,7 +19,8 @@ import { PrivateLocationTestService } from './services/private_location_test_ser import { comparePolicies, getTestProjectSyntheticsPolicy } from './sample_data/test_policy'; export default function ({ getService }: FtrProviderContext) { - describe('AddProjectMonitors', function () { + // FLAKY: https://github.com/elastic/kibana/issues/142110 + describe.skip('AddProjectMonitors', function () { this.tags('skipCloud'); const supertest = getService('supertest');