From: Dr. David von Oheimb Date: Wed, 2 Jun 2021 14:47:58 +0000 (+0200) Subject: 80-test_http.t: Rename to 79-test_http.t, add basic HTTP server ACCEPT test X-Git-Tag: openssl-3.0.0-beta1~211 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d8ea84efaf172af76461855988de2ac8b88beb0;p=thirdparty%2Fopenssl.git 80-test_http.t: Rename to 79-test_http.t, add basic HTTP server ACCEPT test Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15592) --- diff --git a/test/recipes/80-test_http.t b/test/recipes/79-test_http.t similarity index 56% rename from test/recipes/80-test_http.t rename to test/recipes/79-test_http.t index 2297c5a537b..b5bb74393aa 100644 --- a/test/recipes/80-test_http.t +++ b/test/recipes/79-test_http.t @@ -12,10 +12,15 @@ use OpenSSL::Test::Utils; setup("test_http"); -plan tests => 1; +plan tests => 2; SKIP: { skip "sockets disabled", 1 if disabled("sock"); - ok(run(test(["http_test", - srctop_file("test", "certs", "ca-cert.pem")]))); + skip "OCSP disabled", 1 if disabled("ocsp"); + my $cmd = [qw{openssl ocsp -index any -port 0}]; + my @output = run(app($cmd), capture => 1); + ok($output[0] =~ /^ACCEPT (0.0.0.0|\[::\]):(\d+?)$/ && $2 >= 1024, + "HTTP server auto-selects and reports local port >= 1024"); } + +ok(run(test(["http_test", srctop_file("test", "certs", "ca-cert.pem")])));