From 199b8c34823e47a0a189bd20240e3084dfec7527 Mon Sep 17 00:00:00 2001 From: Jason Rhodes Date: Tue, 6 Jun 2023 13:38:02 -0400 Subject: [PATCH] Clean up for PR --- x-pack/plugins/asset_manager/server/lib/get_assets.ts | 11 ----------- .../asset_manager/server/routes/sample_assets.ts | 5 +---- .../api_integration/apis/asset_manager/helpers.ts | 6 +----- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/x-pack/plugins/asset_manager/server/lib/get_assets.ts b/x-pack/plugins/asset_manager/server/lib/get_assets.ts index fb969ca148637..09bcd74ef6c22 100644 --- a/x-pack/plugins/asset_manager/server/lib/get_assets.ts +++ b/x-pack/plugins/asset_manager/server/lib/get_assets.ts @@ -24,7 +24,6 @@ export async function getAssets({ filters = {}, }: GetAssetsOptions): Promise { // Maybe it makes the most sense to validate the filters here? - debug('Get Assets Filters:', JSON.stringify(filters)); const { from = 'now-24h', to = 'now' } = filters; @@ -40,11 +39,6 @@ export async function getAssets({ } if (isStringOrNonEmptyArray(filters.type)) { - debug( - 'filters.type IS string or non empty array?', - typeof filters.type, - JSON.stringify(filters.type) - ); must.push({ terms: { ['asset.type']: Array.isArray(filters.type) ? filters.type : [filters.type], @@ -53,11 +47,6 @@ export async function getAssets({ } if (isStringOrNonEmptyArray(filters.kind)) { - debug( - 'filters.kind IS string or non empty array?', - typeof filters.kind, - JSON.stringify(filters.kind) - ); must.push({ terms: { ['asset.kind']: Array.isArray(filters.kind) ? filters.kind : [filters.kind], diff --git a/x-pack/plugins/asset_manager/server/routes/sample_assets.ts b/x-pack/plugins/asset_manager/server/routes/sample_assets.ts index faab8937a3e7d..98f7f32051f3f 100644 --- a/x-pack/plugins/asset_manager/server/routes/sample_assets.ts +++ b/x-pack/plugins/asset_manager/server/routes/sample_assets.ts @@ -132,10 +132,7 @@ export function sampleAssetsRoutes({ return res.custom({ statusCode: 500, body: { - message: [ - 'TEST change - Not all found data streams were deleted', - errorWhileDeleting, - ].join(' - '), + message: ['Not all found data streams were deleted', errorWhileDeleting].join(' - '), deleted: deletedDataStreams, matching: dataStreamsToDelete, }, diff --git a/x-pack/test/api_integration/apis/asset_manager/helpers.ts b/x-pack/test/api_integration/apis/asset_manager/helpers.ts index ff6db5adc4a15..721fda8345c06 100644 --- a/x-pack/test/api_integration/apis/asset_manager/helpers.ts +++ b/x-pack/test/api_integration/apis/asset_manager/helpers.ts @@ -34,11 +34,7 @@ export async function createSampleAssets( } export async function deleteSampleAssets(supertest: KibanaSupertest) { - const result = await supertest.delete(SAMPLE_ASSETS_ENDPOINT).set('kbn-xsrf', 'xxx'); - // console.log('DELETE RESULT STATUS', result.status); - // console.log('DELETE RESULT BODY', JSON.stringify(result.body)); - expect(result.status).to.be(200); - return result; + return await supertest.delete(SAMPLE_ASSETS_ENDPOINT).set('kbn-xsrf', 'xxx').expect(200); } export async function viewSampleAssetDocs(supertest: KibanaSupertest) {