From f026f5ff2a89c1d6c33fe72d0bcb9f61353cec3d Mon Sep 17 00:00:00 2001 From: Dominique Clarke Date: Thu, 6 Oct 2022 09:26:13 -0400 Subject: [PATCH] [Synthetics] bump bundled package to 0.10.3 (#142650) * synthetics - bump bundled package to 0.10.3 * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * adjust tests * Update x-pack/test/api_integration/apis/uptime/rest/add_monitor_project.ts Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- fleet_packages.json | 4 ++-- .../uptime/rest/add_monitor_private_location.ts | 2 +- .../apis/uptime/rest/add_monitor_project.ts | 14 ++++++++++++-- .../apis/uptime/rest/delete_monitor.ts | 2 +- .../apis/uptime/rest/sample_data/test_policy.ts | 16 ++++++++++++++-- 5 files changed, 30 insertions(+), 8 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..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 @@ -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); @@ -1798,6 +1798,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: { @@ -1828,6 +1836,8 @@ export default function ({ getService }: FtrProviderContext) { fields: { 'monitor.fleet_managed': true, config_id: configId, + 'monitor.project.id': 'test-suite', + 'monitor.project.name': 'test-suite', }, }, }, @@ -1859,7 +1869,7 @@ export default function ({ getService }: FtrProviderContext) { 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/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..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 @@ -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: [ @@ -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', }, @@ -312,7 +318,7 @@ export const getTestProjectSyntheticsPolicy = ( 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: [ @@ -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', },