mirror of
https://github.com/denoland/deno.git
synced 2024-11-26 16:09:27 -05:00
reenable server tests (#3928)
This commit is contained in:
parent
a4bb8bab44
commit
1c0ffa1383
1 changed files with 4 additions and 8 deletions
|
@ -6,12 +6,14 @@
|
||||||
// https://github.com/golang/go/blob/master/src/net/http/responsewrite_test.go
|
// https://github.com/golang/go/blob/master/src/net/http/responsewrite_test.go
|
||||||
|
|
||||||
const { Buffer } = Deno;
|
const { Buffer } = Deno;
|
||||||
|
import { TextProtoReader } from "../textproto/mod.ts";
|
||||||
import { test, runIfMain } from "../testing/mod.ts";
|
import { test, runIfMain } from "../testing/mod.ts";
|
||||||
import { assert, assertEquals, assertNotEquals } from "../testing/asserts.ts";
|
import { assert, assertEquals, assertNotEquals } from "../testing/asserts.ts";
|
||||||
import {
|
import {
|
||||||
Response,
|
Response,
|
||||||
ServerRequest,
|
ServerRequest,
|
||||||
writeResponse,
|
writeResponse,
|
||||||
|
serve,
|
||||||
readRequest,
|
readRequest,
|
||||||
parseHTTPVersion
|
parseHTTPVersion
|
||||||
} from "./server.ts";
|
} from "./server.ts";
|
||||||
|
@ -21,6 +23,7 @@ import {
|
||||||
ReadLineResult,
|
ReadLineResult,
|
||||||
UnexpectedEOFError
|
UnexpectedEOFError
|
||||||
} from "../io/bufio.ts";
|
} from "../io/bufio.ts";
|
||||||
|
import { delay, deferred } from "../util/async.ts";
|
||||||
import { StringReader } from "../io/readers.ts";
|
import { StringReader } from "../io/readers.ts";
|
||||||
|
|
||||||
function assertNotEOF<T extends {}>(val: T | Deno.EOF): T {
|
function assertNotEOF<T extends {}>(val: T | Deno.EOF): T {
|
||||||
|
@ -564,7 +567,6 @@ test({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* TODO(bartlomieju): after removing std/installer/ it hangs, fix and reenable
|
|
||||||
test({
|
test({
|
||||||
name: "[http] destroyed connection",
|
name: "[http] destroyed connection",
|
||||||
async fn(): Promise<void> {
|
async fn(): Promise<void> {
|
||||||
|
@ -603,9 +605,7 @@ test({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
/* TODO(bartlomieju): after removing std/installer/ it hangs, fix and reenable
|
|
||||||
test({
|
test({
|
||||||
name: "[http] serveTLS",
|
name: "[http] serveTLS",
|
||||||
async fn(): Promise<void> {
|
async fn(): Promise<void> {
|
||||||
|
@ -654,9 +654,7 @@ test({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
/* TODO(bartlomieju): after removing std/installer/ it hangs, fix and reenable
|
|
||||||
test({
|
test({
|
||||||
name: "[http] close server while iterating",
|
name: "[http] close server while iterating",
|
||||||
async fn(): Promise<void> {
|
async fn(): Promise<void> {
|
||||||
|
@ -669,7 +667,6 @@ test({
|
||||||
assertEquals(await nextAfterClosing, { value: undefined, done: true });
|
assertEquals(await nextAfterClosing, { value: undefined, done: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
// TODO(kevinkassimo): create a test that works on Windows.
|
// TODO(kevinkassimo): create a test that works on Windows.
|
||||||
// The following test is to ensure that if an error occurs during respond
|
// The following test is to ensure that if an error occurs during respond
|
||||||
|
@ -678,7 +675,6 @@ test({
|
||||||
// receive a RST and thus trigger an error during response for us to test.
|
// receive a RST and thus trigger an error during response for us to test.
|
||||||
// We need to find a way to similarly trigger an error on Windows so that
|
// We need to find a way to similarly trigger an error on Windows so that
|
||||||
// we can test if connection is closed.
|
// we can test if connection is closed.
|
||||||
/* TODO(bartlomieju): after removing std/installer/ it hangs, fix and reenable
|
|
||||||
if (Deno.build.os !== "win") {
|
if (Deno.build.os !== "win") {
|
||||||
test({
|
test({
|
||||||
name: "[http] respond error handling",
|
name: "[http] respond error handling",
|
||||||
|
@ -736,5 +732,5 @@ if (Deno.build.os !== "win") {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
runIfMain(import.meta);
|
runIfMain(import.meta);
|
||||||
|
|
Loading…
Reference in a new issue