Sha256: f3aacb9395bb6feda798dd1b891c38a4d6d0ee70c7ac4515b5ded0a1be6da106

Contents?: true

Size: 996 Bytes

Versions: 100

Compression:

Stored size: 996 Bytes

Contents

#!/bin/sh
. ./test-lib.sh
t_plan 7 "reload config.ru error with preload_app true"

t_begin "setup and start" && {
	unicorn_setup
	rtmpfiles ru

	cat > $ru <<\EOF
use Rack::ContentLength
use Rack::ContentType, "text/plain"
x = { "hello" => "world" }
run lambda { |env| [ 200, {}, [ x.inspect << "\n" ] ] }
EOF
	echo 'preload_app true' >> $unicorn_config
	unicorn -D -c $unicorn_config $ru
	unicorn_wait_start
}

t_begin "hit with curl" && {
	out=$(curl -sSf http://$listen/)
	test x"$out" = x'{"hello"=>"world"}'
}

t_begin "introduce syntax error in rackup file" && {
	echo '...' >> $ru
}

t_begin "reload signal succeeds" && {
	kill -HUP $unicorn_pid
	while ! egrep '(done|error) reloading' $r_err >/dev/null
	do
		sleep 1
	done

	grep 'error reloading' $r_err >/dev/null
	> $r_err
}

t_begin "hit with curl" && {
	out=$(curl -sSf http://$listen/)
	test x"$out" = x'{"hello"=>"world"}'
}

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

t_begin "check stderr" && {
	check_stderr
}

t_done

Version data entries

100 entries across 100 versions & 11 rubygems

Version Path
unicorn-6.1.0 t/t0001-reload-bad-config.sh
unicorn-6.0.0 t/t0001-reload-bad-config.sh
unicorn-5.8.0 t/t0001-reload-bad-config.sh
unicorn-5.7.0 t/t0001-reload-bad-config.sh
unicorn-5.6.0 t/t0001-reload-bad-config.sh
unicorn-5.5.5 t/t0001-reload-bad-config.sh
unicorn-5.5.4 t/t0001-reload-bad-config.sh
unicorn-5.5.3 t/t0001-reload-bad-config.sh
unicorn-5.5.2 t/t0001-reload-bad-config.sh
unicorn-5.5.1 t/t0001-reload-bad-config.sh
unicorn-5.5.0.1.g6836 t/t0001-reload-bad-config.sh
unicorn-5.5.0 t/t0001-reload-bad-config.sh
unicorn-5.5.0.pre1 t/t0001-reload-bad-config.sh
unicorn-5.4.1 t/t0001-reload-bad-config.sh
unicorn-5.4.0 t/t0001-reload-bad-config.sh
unicorn-5.3.1 t/t0001-reload-bad-config.sh
unicorn-shopify-5.3.0 t/t0001-reload-bad-config.sh
unicorn-5.3.0 t/t0001-reload-bad-config.sh
unicorn-5.3.0.pre1 t/t0001-reload-bad-config.sh
unicorn-shopify-5.2.0.6 t/t0001-reload-bad-config.sh