From 8e3c520a65382a9676e4089462549fa1c4ade5ad Mon Sep 17 00:00:00 2001 From: Steph Milovic Date: Tue, 5 Sep 2023 12:40:13 -0600 Subject: [PATCH 1/2] Fix axios get --- x-pack/plugins/actions/server/lib/axios_utils.test.ts | 3 --- x-pack/plugins/actions/server/lib/axios_utils.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/x-pack/plugins/actions/server/lib/axios_utils.test.ts b/x-pack/plugins/actions/server/lib/axios_utils.test.ts index 1f94e610f60bf..7423042e68228 100644 --- a/x-pack/plugins/actions/server/lib/axios_utils.test.ts +++ b/x-pack/plugins/actions/server/lib/axios_utils.test.ts @@ -66,7 +66,6 @@ describe('request', () => { expect(axiosMock).toHaveBeenCalledWith('/test', { method: 'get', - data: {}, httpAgent: undefined, httpsAgent: expect.any(HttpsAgent), proxy: false, @@ -100,7 +99,6 @@ describe('request', () => { expect(axiosMock).toHaveBeenCalledWith(TestUrl, { method: 'get', - data: {}, httpAgent, httpsAgent, proxy: false, @@ -132,7 +130,6 @@ describe('request', () => { expect(axiosMock).toHaveBeenCalledWith('https://testProxy', { method: 'get', - data: {}, httpAgent: undefined, httpsAgent: expect.any(HttpsAgent), proxy: false, diff --git a/x-pack/plugins/actions/server/lib/axios_utils.ts b/x-pack/plugins/actions/server/lib/axios_utils.ts index 181893db15f0c..163eac3eada2b 100644 --- a/x-pack/plugins/actions/server/lib/axios_utils.ts +++ b/x-pack/plugins/actions/server/lib/axios_utils.ts @@ -51,7 +51,7 @@ export const request = async ({ ...config, method, headers, - data: data ?? {}, + ...(data ? { data } : {}), // use httpAgent and httpsAgent and set axios proxy: false, to be able to handle fail on invalid certs httpAgent, httpsAgent, From 1f15ef92c031418b174e7fb9322c8d46e9467f13 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 5 Sep 2023 20:46:33 +0000 Subject: [PATCH 2/2] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- .../synthetics/components/common/components/view_document.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/view_document.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/view_document.tsx index a37a5d8afd17e..591c91a902146 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/view_document.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/components/view_document.tsx @@ -53,6 +53,7 @@ export const ViewDocument = ({ ping }: { ping: Ping }) => { return ( <> {