changeset 1260:eadd24ccfda1

Tests: postponed startup in certain ssl certificate tests on win32. At least, some win32 hosts exhibit a round-off error or some such in the notBefore field of the certificate generated before starting nginx, such that it can be set to the value one second ahead of the current time. This manifests in spurious test failures due to certificate verify error with a failure reason "certificate is not yet valid".
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 12 Dec 2017 12:53:53 +0300
parents caf59f42a3e1
children 5da72eaa893f
files proxy_ssl_certificate.t proxy_ssl_verify.t ssl_verify_client.t stream_proxy_ssl_certificate.t stream_proxy_ssl_verify.t
diffstat 5 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/proxy_ssl_certificate.t
+++ b/proxy_ssl_certificate.t
@@ -128,6 +128,8 @@ foreach my $name ('3.example.com') {
 		or die "Can't create certificate for $name: $!\n";
 }
 
+sleep 1 if $^O eq 'MSWin32';
+
 $t->write_file('password', '3.example.com');
 $t->write_file('index.html', '');
 
--- a/proxy_ssl_verify.t
+++ b/proxy_ssl_verify.t
@@ -142,6 +142,8 @@ foreach my $name ('1.example.com', '2.ex
 		or die "Can't create certificate for $name: $!\n";
 }
 
+sleep 1 if $^O eq 'MSWin32';
+
 $t->write_file('index.html', '');
 
 $t->run();
--- a/ssl_verify_client.t
+++ b/ssl_verify_client.t
@@ -113,6 +113,8 @@ foreach my $name ('1.example.com', '2.ex
 		or die "Can't create certificate for $name: $!\n";
 }
 
+sleep 1 if $^O eq 'MSWin32';
+
 $t->write_file('t', 'SEE-THIS');
 
 $t->run();
--- a/stream_proxy_ssl_certificate.t
+++ b/stream_proxy_ssl_certificate.t
@@ -132,6 +132,8 @@ foreach my $name ('3.example.com') {
 		or die "Can't create certificate for $name: $!\n";
 }
 
+sleep 1 if $^O eq 'MSWin32';
+
 $t->write_file('password', '3.example.com');
 $t->write_file('index.html', '');
 
--- a/stream_proxy_ssl_verify.t
+++ b/stream_proxy_ssl_verify.t
@@ -142,6 +142,8 @@ foreach my $name ('1.example.com', '2.ex
 		or die "Can't create certificate for $name: $!\n";
 }
 
+sleep 1 if $^O eq 'MSWin32';
+
 $t->write_file('index.html', '');
 
 $t->run_daemon(\&http_daemon);