Skip to content

Commit

Permalink
Merge pull request #2126 from krmodelski/proxy-support-test-fix
Browse files Browse the repository at this point in the history
Fix proxy tests
  • Loading branch information
k8s-ci-robot authored Dec 27, 2024
2 parents 0f5694e + 984a372 commit 27ba0e1
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 27ba0e1

Please sign in to comment.