From 984a3725c03103d5f83c846456e4b75b1b4d84d4 Mon Sep 17 00:00:00 2001 From: krmodelski <55512362+krmodelski@users.noreply.github.com> Date: Wed, 25 Dec 2024 21:31:43 +0100 Subject: [PATCH] fix proxy tests --- src/config_test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config_test.ts b/src/config_test.ts index 262893c35a..34e94140a4 100644 --- a/src/config_test.ts +++ b/src/config_test.ts @@ -396,7 +396,7 @@ describe('KubeConfig', () => { expect(rc.getAgent()).to.be.instanceOf(HttpsProxyAgent); const agent = rc.getAgent() as HttpsProxyAgent; expect(agent.options.ca?.toString()).to.equal(expectedCA.toString()); - expect(agent.proxy.href).to.equal(expectedProxyHref); + expect((agent as any).proxy.href).to.equal(expectedProxyHref); }); it('should apply http proxy', async () => { const kc = new KubeConfig(); @@ -412,8 +412,8 @@ describe('KubeConfig', () => { expect(rc.getAgent()).to.be.instanceOf(HttpProxyAgent); const agent = rc.getAgent() as HttpProxyAgent; - expect(agent.options.ca?.toString()).to.equal(expectedCA.toString()); - expect(agent.proxy.href).to.equal(expectedProxyHref); + expect((agent as any).options.ca?.toString()).to.equal(expectedCA.toString()); + expect((agent as any).proxy.href).to.equal(expectedProxyHref); }); it('should throw an error if proxy-url is provided but the server protocol is not http or https', async () => { const kc = new KubeConfig();