| Index: sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_request_asset_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/unserve_directory_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_request_asset_test.dart
|
| similarity index 54%
|
| copy from sdk/lib/_internal/pub/test/serve/web_socket/unserve_directory_test.dart
|
| copy to sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_request_asset_test.dart
|
| index f9446d95eaf2d1eb83f1ce575b0f6d057d383be5..cc6ecd4a5200113ef8a328ae23130edc5b61d5b1 100644
|
| --- a/sdk/lib/_internal/pub/test/serve/web_socket/unserve_directory_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_request_asset_test.dart
|
| @@ -4,13 +4,16 @@
|
|
|
| library pub_tests;
|
|
|
| +import 'package:scheduled_test/scheduled_test.dart';
|
| +
|
| import '../../descriptor.dart' as d;
|
| import '../../test_pub.dart';
|
| import '../utils.dart';
|
|
|
| main() {
|
| initConfig();
|
| - integration("unbinds a directory from a port", () {
|
| + integration("binds a directory to a new port and immediately requests an "
|
| + "asset URL from that server", () {
|
| d.dir(appPath, [
|
| d.appPubspec(),
|
| d.dir("test", [
|
| @@ -21,22 +24,15 @@ main() {
|
| ])
|
| ]).create();
|
|
|
| - pubServe();
|
| + pubServe(args: ["web"]);
|
|
|
| - requestShouldSucceed("index.html", "<body>");
|
| - requestShouldSucceed("index.html", "<test body>", root: "test");
|
| + // Bind the new directory.
|
| + expect(webSocketRequest("serveDirectory", {"path": "test"}), completes);
|
|
|
| - // Unbind the directory.
|
| - expectWebSocketResult("unserveDirectory", {"path": "test"}, {
|
| - "url": getServerUrl("test")
|
| + expectWebSocketResult("pathToUrls", {"path": "test/index.html"}, {
|
| + "urls": [endsWith("/index.html")]
|
| });
|
|
|
| - // "test" should not be served now.
|
| - requestShouldNotConnect("index.html", root: "test");
|
| -
|
| - // "web" is still fine.
|
| - requestShouldSucceed("index.html", "<body>");
|
| -
|
| endPubServe();
|
| });
|
| }
|
|
|