summaryrefslogtreecommitdiff
path: root/cli/tests/unit/tls_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/tls_test.ts')
-rw-r--r--cli/tests/unit/tls_test.ts68
1 files changed, 34 insertions, 34 deletions
diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts
index ae5a6562d..391c51504 100644
--- a/cli/tests/unit/tls_test.ts
+++ b/cli/tests/unit/tls_test.ts
@@ -32,7 +32,7 @@ unitTest(async function connectTLSNoPerm() {
});
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function connectTLSInvalidHost() {
const listener = await Deno.listenTls({
hostname: "localhost",
@@ -60,7 +60,7 @@ unitTest(async function connectTLSCertFileNoReadPerm() {
});
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
function listenTLSNonExistentCertKeyFiles() {
const options = {
hostname: "localhost",
@@ -85,7 +85,7 @@ unitTest(
},
);
-unitTest({ perms: { net: true } }, function listenTLSNoReadPerm() {
+unitTest({ permissions: { net: true } }, function listenTLSNoReadPerm() {
assertThrows(() => {
Deno.listenTls({
hostname: "localhost",
@@ -98,7 +98,7 @@ unitTest({ perms: { net: true } }, function listenTLSNoReadPerm() {
unitTest(
{
- perms: { read: true, write: true, net: true },
+ permissions: { read: true, write: true, net: true },
},
function listenTLSEmptyKeyFile() {
const options = {
@@ -124,7 +124,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, write: true, net: true } },
+ { permissions: { read: true, write: true, net: true } },
function listenTLSEmptyCertFile() {
const options = {
hostname: "localhost",
@@ -149,7 +149,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function dialAndListenTLS() {
const resolvable = deferred();
const hostname = "localhost";
@@ -301,7 +301,7 @@ async function receiveThenSend(
}
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsServerStreamHalfCloseSendOneByte() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -312,7 +312,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsClientStreamHalfCloseSendOneByte() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -323,7 +323,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsServerStreamHalfCloseSendOneChunk() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -334,7 +334,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsClientStreamHalfCloseSendOneChunk() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -345,7 +345,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsServerStreamHalfCloseSendManyBytes() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -356,7 +356,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsClientStreamHalfCloseSendManyBytes() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -367,7 +367,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsServerStreamHalfCloseSendManyChunks() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -378,7 +378,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsClientStreamHalfCloseSendManyChunks() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -428,7 +428,7 @@ async function receiveAlotSendNothing(conn: Deno.Conn) {
}
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsServerStreamCancelRead() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -439,7 +439,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsClientStreamCancelRead() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -485,7 +485,7 @@ async function sendReceiveEmptyBuf(conn: Deno.Conn) {
}
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsStreamSendReceiveEmptyBuf() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -511,7 +511,7 @@ async function closeWriteAndClose(conn: Deno.Conn) {
}
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsServerStreamImmediateClose() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -522,7 +522,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsClientStreamImmediateClose() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -533,7 +533,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsClientAndServerStreamImmediateClose() {
const [serverConn, clientConn] = await tlsPair();
await Promise.all([
@@ -776,7 +776,7 @@ async function tlsWithTcpFailureTestImpl(
}
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsHandshakeWithTcpCorruptionImmediately() {
await tlsWithTcpFailureTestImpl("handshake", 0, "corruption", false);
await tlsWithTcpFailureTestImpl("handshake", 0, "corruption", true);
@@ -784,7 +784,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsHandshakeWithTcpShutdownImmediately() {
await tlsWithTcpFailureTestImpl("handshake", 0, "shutdown", false);
await tlsWithTcpFailureTestImpl("handshake", 0, "shutdown", true);
@@ -792,7 +792,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsHandshakeWithTcpCorruptionAfter70Bytes() {
await tlsWithTcpFailureTestImpl("handshake", 76, "corruption", false);
await tlsWithTcpFailureTestImpl("handshake", 78, "corruption", true);
@@ -800,7 +800,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsHandshakeWithTcpShutdownAfter70bytes() {
await tlsWithTcpFailureTestImpl("handshake", 77, "shutdown", false);
await tlsWithTcpFailureTestImpl("handshake", 79, "shutdown", true);
@@ -808,7 +808,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsHandshakeWithTcpCorruptionAfter200Bytes() {
await tlsWithTcpFailureTestImpl("handshake", 200, "corruption", false);
await tlsWithTcpFailureTestImpl("handshake", 202, "corruption", true);
@@ -816,7 +816,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsHandshakeWithTcpShutdownAfter200bytes() {
await tlsWithTcpFailureTestImpl("handshake", 201, "shutdown", false);
await tlsWithTcpFailureTestImpl("handshake", 203, "shutdown", true);
@@ -824,7 +824,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsTrafficWithTcpCorruption() {
await tlsWithTcpFailureTestImpl("traffic", Infinity, "corruption", false);
await tlsWithTcpFailureTestImpl("traffic", Infinity, "corruption", true);
@@ -832,7 +832,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function tlsTrafficWithTcpShutdown() {
await tlsWithTcpFailureTestImpl("traffic", Infinity, "shutdown", false);
await tlsWithTcpFailureTestImpl("traffic", Infinity, "shutdown", true);
@@ -913,7 +913,7 @@ async function curl(url: string): Promise<string> {
}
unitTest(
- { perms: { read: true, net: true, run: true } },
+ { permissions: { read: true, net: true, run: true } },
async function curlFakeHttpsServer() {
const port = getPort();
const listener = createHttpsListener(port);
@@ -937,7 +937,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function startTls() {
const hostname = "smtp.gmail.com";
const port = 587;
@@ -988,7 +988,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function connectTLSBadClientCertPrivateKey(): Promise<void> {
await assertRejects(async () => {
await Deno.connectTls({
@@ -1004,7 +1004,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function connectTLSBadPrivateKey(): Promise<void> {
await assertRejects(async () => {
await Deno.connectTls({
@@ -1020,7 +1020,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function connectTLSNotPrivateKey(): Promise<void> {
await assertRejects(async () => {
await Deno.connectTls({
@@ -1036,7 +1036,7 @@ unitTest(
);
unitTest(
- { perms: { read: true, net: true } },
+ { permissions: { read: true, net: true } },
async function connectWithClientCert() {
// The test_server running on port 4552 responds with 'PASS' if client
// authentication was successful. Try it by running test_server and