Skip to content

fix: casing of applyToHttpsOptions #1037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class KubeConfig {
this.makePathsAbsolute(rootDirectory);
}

public async applytoHTTPSOptions(opts: https.RequestOptions | WebSocket.ClientOptions): Promise<void> {
public async applyToHTTPSOptions(opts: https.RequestOptions | WebSocket.ClientOptions): Promise<void> {
await this.applyOptions(opts);

const user = this.getCurrentUser();
Expand Down
6 changes: 3 additions & 3 deletions src/config_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ describe('KubeConfig', () => {
kc.loadFromFile(kcTlsServerNameFileName);

const opts: https.RequestOptions = {};
await kc.applytoHTTPSOptions(opts);
await kc.applyToHTTPSOptions(opts);

expect(opts).to.deep.equal({
headers: {},
Expand Down Expand Up @@ -285,7 +285,7 @@ describe('KubeConfig', () => {
kc.loadFromFile(kcFileName);

const opts: https.RequestOptions = {};
kc.applytoHTTPSOptions(opts);
kc.applyToHTTPSOptions(opts);

expect(opts).to.deep.equal({
headers: {},
Expand Down Expand Up @@ -701,7 +701,7 @@ describe('KubeConfig', () => {

config.loadFromClusterAndUser({} as Cluster, { username: user, password: passwd } as User);
const opts = {} as https.RequestOptions;
await config.applytoHTTPSOptions(opts);
await config.applyToHTTPSOptions(opts);

expect(opts.auth).to.equal(`${user}:${passwd}`);
});
Expand Down
2 changes: 1 addition & 1 deletion src/proto-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class ProtoClient {
hostname: u.hostname,
protocol: u.protocol,
};
await this.config.applytoHTTPSOptions(options);
await this.config.applyToHTTPSOptions(options);
const req = http.request(options);

const result = await new Promise<any>((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion src/web-socket-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class WebSocketHandler implements WebSocketInterface {

const opts: WebSocket.ClientOptions = {};

await this.config.applytoHTTPSOptions(opts);
await this.config.applyToHTTPSOptions(opts);

return await new Promise<WebSocket>((resolve, reject) => {
const client = this.socketFactory
Expand Down