Skip to content

Commit

Permalink
Clean up for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonrhodes committed Jun 6, 2023
1 parent b4e92a1 commit 199b8c3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
11 changes: 0 additions & 11 deletions x-pack/plugins/asset_manager/server/lib/get_assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export async function getAssets({
filters = {},
}: GetAssetsOptions): Promise<Asset[]> {
// 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;
Expand All @@ -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],
Expand All @@ -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],
Expand Down
5 changes: 1 addition & 4 deletions x-pack/plugins/asset_manager/server/routes/sample_assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@ export function sampleAssetsRoutes<T extends RequestHandlerContext>({
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,
},
Expand Down
6 changes: 1 addition & 5 deletions x-pack/test/api_integration/apis/asset_manager/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 199b8c3

Please sign in to comment.