Skip to content

Commit 14c7fc5

Browse files
committed
fixing node 18
1 parent 6f3b4e5 commit 14c7fc5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

test/Ported/HttpsTest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,14 @@ async function extractCertificate(certificateRawData: CertificateRawData) {
274274
const entryText = await readToEnd(entry);
275275
const lines = entryText.split(/\r?\n/);
276276
cert = lines.slice(1, lines.length - 2).join("\r\n");
277+
break;
277278
} else {
278279
entry.autodrain();
279280
}
280281
}
281282

283+
stream.destroy();
284+
282285
return cert;
283286
}
284287

test/Utils/TestUtil.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ class TestSecuredServiceLocator extends RavenServerLocator {
106106
}
107107

108108
public getServerCertificatePath() {
109-
return path.resolve(process.env[TestSecuredServiceLocator.ENV_SERVER_CERTIFICATE_PATH]);
109+
const certPath = process.env[TestSecuredServiceLocator.ENV_SERVER_CERTIFICATE_PATH];
110+
if (!certPath) {
111+
throwError("InvalidArgumentException", TestSecuredServiceLocator.ENV_SERVER_CERTIFICATE_PATH + " env variable is missing");
112+
}
113+
return path.resolve(certPath);
110114
}
111115

112116
public getClientAuthOptions(): IAuthOptions {

0 commit comments

Comments
 (0)