| Index: tests/standalone/io/https_unauthorized_test.dart
|
| diff --git a/tests/standalone/io/https_bad_certificate_test.dart b/tests/standalone/io/https_unauthorized_test.dart
|
| similarity index 69%
|
| copy from tests/standalone/io/https_bad_certificate_test.dart
|
| copy to tests/standalone/io/https_unauthorized_test.dart
|
| index 90236809de01c5a9988505d4b53dfccfd9cf96fb..f8fe73181245547aba197e70e0ec6d536622e054 100644
|
| --- a/tests/standalone/io/https_bad_certificate_test.dart
|
| +++ b/tests/standalone/io/https_unauthorized_test.dart
|
| @@ -2,7 +2,8 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -// This test verifies that the bad certificate callback works in HttpClient.
|
| +// This test verifies that secure connections that fail due to
|
| +// unauthenticated certificates throw exceptions in HttpClient.
|
|
|
| import "package:expect/expect.dart";
|
| import "package:path/path.dart";
|
| @@ -29,15 +30,15 @@ Future<SecureServerSocket> runServer() {
|
|
|
| void main() {
|
| final options = new Options();
|
| - var clientScript =
|
| - join(dirname(options.script), 'https_bad_certificate_client.dart');
|
| + var clientScript = join(dirname(options.script),
|
| + 'https_unauthorized_client.dart');
|
|
|
| - Future clientProcess(int port, String acceptCertificate) {
|
| + Future clientProcess(int port) {
|
| return Process.run(options.executable,
|
| - [clientScript, port.toString(), acceptCertificate])
|
| + [clientScript, port.toString()])
|
| .then((ProcessResult result) {
|
| if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) {
|
| - print("Client failed, acceptCertificate: $acceptCertificate");
|
| + print("Client failed");
|
| print(" stdout:");
|
| print(result.stdout);
|
| print(" stderr:");
|
| @@ -48,10 +49,7 @@ void main() {
|
| }
|
|
|
| runServer().then((server) {
|
| - Future.wait([clientProcess(server.port, 'true'),
|
| - clientProcess(server.port, 'false'),
|
| - clientProcess(server.port, 'fisk'),
|
| - clientProcess(server.port, 'exception')]).then((_) {
|
| + clientProcess(server.port).then((_) {
|
| server.close();
|
| });
|
| });
|
|
|