[nginx-tests] Tests: fixed stop_SSL() usage in ssl.t.
Maxim Dounin
mdounin at mdounin.ru
Fri Jan 30 10:36:20 UTC 2026
details: http://freenginx.org/hg/nginx-tests/rev/729a215c18f9
branches:
changeset: 2037:729a215c18f9
user: Maxim Dounin <mdounin at mdounin.ru>
date: Fri Jan 30 13:22:17 2026 +0300
description:
Tests: fixed stop_SSL() usage in ssl.t.
IO::Socket::SSL's stop_SSL() is documented to return true on success,
and not 1, so testing for 1 is wrong. This was missed during conversion
from Net::SSLeay to IO::Socket::SSL in 1866:a797d7428fa5. Further,
IO::Socket::SSL started to actually return an object on success in recently
released version 2.096, breaking the test.
Fix is to use ok() test instead of is(), properly testing for a true value
being returned.
diffstat:
ssl.t | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff --git a/ssl.t b/ssl.t
--- a/ssl.t
+++ b/ssl.t
@@ -268,7 +268,7 @@ ok(get_ssl_socket(8085), 'ssl unexpected
# close_notify is sent before lingering close
-is(get_ssl_shutdown(8085), 1, 'ssl shutdown on lingering close');
+ok(get_ssl_shutdown(8085), 'ssl shutdown on lingering close');
$t->stop();
More information about the nginx-devel
mailing list