Skip to content

Commit

Permalink
fix proxy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krmodelski committed Dec 25, 2024
1 parent 0f5694e commit 984a372
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 984a372

Please sign in to comment.