From cd5b2cf6437c978dd3738b1ca284c5b5217f38df Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:25:26 -0500 Subject: [PATCH] Fix broken unit tests Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../client/AbstractRestClient.unit.test.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/imperative/src/rest/__tests__/client/AbstractRestClient.unit.test.ts b/packages/imperative/src/rest/__tests__/client/AbstractRestClient.unit.test.ts index fcd7669552..98005ccff5 100644 --- a/packages/imperative/src/rest/__tests__/client/AbstractRestClient.unit.test.ts +++ b/packages/imperative/src/rest/__tests__/client/AbstractRestClient.unit.test.ts @@ -1502,22 +1502,6 @@ describe("AbstractRestClient tests", () => { const result = privateRestClient.buildOptions(resource, request, reqHeaders); expect(Object.keys(result)).toContain('agent'); }); - - it('Should use session proxy options over env vars for proxy agent', () => { - restSession.ISession.proxy = { proxy_authorization: 'proxy_auth_string'}; - const resource = '/resource'; - const request = ''; - const reqHeaders: any[] = []; - const url = new URL('https://www.zowe.com'); - const proxyAgent = new HttpsProxyAgent(url, { rejectUnauthorized: true }); - getSystemProxyUrlSpy.mockReturnValue(url); - getProxyAgentSpy.mockReturnValue(proxyAgent); - setCertPemAuthSpy.mockReturnValue(true); - const headerSpy = jest.spyOn(privateRestClient, "appendHeaders"); - const result = privateRestClient.buildOptions(resource, request, reqHeaders); - expect(Object.keys(result)).toContain('agent'); - expect(headerSpy).toHaveBeenCalledWith([{'Proxy-Authorization': restSession.ISession.proxy.proxy_authorization}]); - }); }); }); });