diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-06-02 16:47:58 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-06-04 07:07:32 +0200 |
commit | 5d8ea84efaf172af76461855988de2ac8b88beb0 (patch) | |
tree | 59962b558e349473d1a5b630584cf306fba59aac /test | |
parent | 80-test_cmp_http.t: Improve comparison on server_port variable (diff) | |
download | openssl-5d8ea84efaf172af76461855988de2ac8b88beb0.tar.xz openssl-5d8ea84efaf172af76461855988de2ac8b88beb0.zip |
80-test_http.t: Rename to 79-test_http.t, add basic HTTP server ACCEPT test
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15592)
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/79-test_http.t (renamed from test/recipes/80-test_http.t) | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/recipes/80-test_http.t b/test/recipes/79-test_http.t index 2297c5a537..b5bb74393a 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")]))); |