diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-02-19 01:26:16 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 07:26:16 -0700 |
commit | 3a243c827238b93c3f09a38e3b5e90e2ccfc15a1 (patch) | |
tree | 47447f0c214693be360776ee5e43849d8eda287f /tests/unit/fetch_test.ts | |
parent | 08071f9561b17b8899f370dc771604c2c2da445f (diff) |
BREAKING: add `Deno.CreateHttpClientOptions.{cert,key}` (#22280)
This change deprecates
`Deno.CreateHttpClientOptions.{certChain,privateKey}` in favour of
`Deno.CreateHttpClientOptions.{cert,key}`.
Closes #22278
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'tests/unit/fetch_test.ts')
-rw-r--r-- | tests/unit/fetch_test.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/fetch_test.ts b/tests/unit/fetch_test.ts index dc596718f..c33503bdf 100644 --- a/tests/unit/fetch_test.ts +++ b/tests/unit/fetch_test.ts @@ -1333,8 +1333,8 @@ Deno.test( async function fetchClientCertWrongPrivateKey(): Promise<void> { await assertRejects(async () => { const client = Deno.createHttpClient({ - certChain: "bad data", - privateKey: await Deno.readTextFile( + cert: "bad data", + key: await Deno.readTextFile( "tests/testdata/tls/localhost.key", ), }); @@ -1350,10 +1350,10 @@ Deno.test( async function fetchClientCertBadPrivateKey(): Promise<void> { await assertRejects(async () => { const client = Deno.createHttpClient({ - certChain: await Deno.readTextFile( + cert: await Deno.readTextFile( "tests/testdata/tls/localhost.crt", ), - privateKey: "bad data", + key: "bad data", }); await fetch("https://localhost:5552/assets/fixture.json", { client, @@ -1367,10 +1367,10 @@ Deno.test( async function fetchClientCertNotPrivateKey(): Promise<void> { await assertRejects(async () => { const client = Deno.createHttpClient({ - certChain: await Deno.readTextFile( + cert: await Deno.readTextFile( "tests/testdata/tls/localhost.crt", ), - privateKey: "", + key: "", }); await fetch("https://localhost:5552/assets/fixture.json", { client, @@ -1387,10 +1387,10 @@ Deno.test( const data = "Hello World"; const caCert = await Deno.readTextFile("tests/testdata/tls/RootCA.crt"); const client = Deno.createHttpClient({ - certChain: await Deno.readTextFile( + cert: await Deno.readTextFile( "tests/testdata/tls/localhost.crt", ), - privateKey: await Deno.readTextFile( + key: await Deno.readTextFile( "tests/testdata/tls/localhost.key", ), caCerts: [caCert], |