Skip to content

Commit

Permalink
Enable insecure HTTPS test-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeharder committed Sep 21, 2021
1 parent c5d61c4 commit 7a977fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export abstract class SecretTest<TOptions = Record<string, unknown>> extends Per

constructor() {
super();
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
this.secretClient = new SecretClient(keyVaultUri, credential, this.configureClientOptionsCoreV1({}));
}

Expand Down
5 changes: 3 additions & 2 deletions sdk/test-utils/perfstress/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { IncomingMessage, RequestOptions, request } from "http";
import { IncomingMessage } from "http";
import { RequestOptions, request } from "https";
import { TestProxyHttpClient, TestProxyHttpClientV1 } from "./testProxyHttpClient";

/**
Expand All @@ -25,7 +26,7 @@ export function getEnvVar(name: string) {
*/
export async function drainStream(stream: NodeJS.ReadableStream) {
return new Promise((resolve, reject) => {
stream.on("data", () => {});
stream.on("data", () => { });
stream.on("end", resolve);
stream.on("error", reject);
});
Expand Down

0 comments on commit 7a977fb

Please sign in to comment.