support for Rack hijack in request and response
[unicorn.git] / t / t0600-https-server-basic.sh
blob5dd0d651b22d755d30525a14150aecc57c6763a8
1 #!/bin/sh
2 . ./test-lib.sh
3 t_plan 7 "simple HTTPS connection tests"
5 t_begin "setup and start" && {
6 rtmpfiles curl_err
7 unicorn_setup
8 cat > $unicorn_config <<EOF
9 ssl do
10 listen "$listen"
11 ssl_certificate "server.crt"
12 ssl_certificate_key "server.key"
13 end
14 pid "$pid"
15 stderr_path "$r_err"
16 stdout_path "$r_out"
17 EOF
18 unicorn -D -c $unicorn_config env.ru
19 unicorn_wait_start
22 t_begin "single request" && {
23 curl -sSfv --cacert ca.crt https://$listen/
26 t_begin "check stderr has no errors" && {
27 check_stderr
30 t_begin "multiple requests" && {
31 curl -sSfv --no-keepalive --cacert ca.crt \
32 https://$listen/ https://$listen/ 2>> $curl_err >> $tmp
33 dbgcat curl_err
36 t_begin "check stderr has no errors" && {
37 check_stderr
40 t_begin "killing succeeds" && {
41 kill $unicorn_pid
44 t_begin "check stderr has no errors" && {
45 check_stderr
48 t_done