unicorn.git  about / heads / tags
Rack HTTP server for Unix and fast clients
blob 4e3acbe9a1d08cd1c9a9c7fe75484be697cf8849 531 bytes (raw)
$ git show HEAD:t/t0015-configurator-internals.sh	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
#!/bin/sh
. ./test-lib.sh
t_plan 4 "configurator internals tests (from FAQ)"

t_begin "setup and start" && {
	unicorn_setup
	cat >> $unicorn_config <<EOF
HttpRequest::DEFAULTS["rack.url_scheme"] = "https"
Configurator::DEFAULTS[:logger].formatter = Logger::Formatter.new
EOF
	unicorn -D -c $unicorn_config env.ru
	unicorn_wait_start
}

t_begin "single request" && {
	curl -sSfv http://$listen/ | grep '"rack.url_scheme"=>"https"'
}

t_begin "killing succeeds" && {
	kill $unicorn_pid
}

t_begin "no errors" && check_stderr

t_done

git clone https://yhbt.net/unicorn.git