Skip to content

Commit 348d359

Browse files
committed
tests: fixed the test case added in commit 6ef9481.
1 parent 5aed196 commit 348d359

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

t/014-bugs.t

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ $ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8';
2626
#no_shuffle();
2727
no_long_string();
2828

29+
sub read_file {
30+
my $infile = shift;
31+
open my $in, $infile
32+
or die "cannot open $infile for reading: $!";
33+
my $cert = do { local $/; <$in> };
34+
close $in;
35+
$cert;
36+
}
37+
38+
our $TestCertificate = read_file("t/cert/test.crt");
39+
our $TestCertificateKey = read_file("t/cert/test.key");
40+
2941
run_tests();
3042

3143
__DATA__
@@ -927,6 +939,12 @@ function go(port)
927939
end
928940
--- request
929941
GET /t
942+
--- stap2
943+
F(ngx_close_connection) {
944+
println("=== close connection")
945+
print_ubacktrace()
946+
}
947+
--- stap_out2
930948
--- response_body
931949
done
932950
--- wait: 0.5
@@ -958,8 +976,8 @@ ok
958976
--- http_config
959977
server {
960978
listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl;
961-
ssl_certificate /tmp/test.crt;
962-
ssl_certificate_key /tmp/test.key;
979+
ssl_certificate ../html/test.crt;
980+
ssl_certificate_key ../html/test.key;
963981
964982
location /foo {
965983
echo foo;
@@ -974,6 +992,13 @@ ok
974992
location = /t {
975993
proxy_pass https://local/foo;
976994
}
995+
996+
--- user_files eval
997+
">>> test.key
998+
$::TestCertificateKey
999+
>>> test.crt
1000+
$::TestCertificate"
1001+
9771002
--- request
9781003
GET /t
9791004

0 commit comments

Comments
 (0)