Sha256: c4aaa7da6a22481a05950f0bc7e4480826c5da6f490fec14d6b2323e7e535e51

Contents?: true

Size: 888 Bytes

Versions: 26

Compression:

Stored size: 888 Bytes

Contents

#!/bin/sh
. ./test-lib.sh
t_plan 6 "config variables conflict with preload_app"

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

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

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

t_begin "modify rackup file" && {
	ed -s $ru <<EOF
,s/world/WORLD/
w
EOF
}

t_begin "reload signal succeeds" && {
	kill -HUP $rainbows_pid
	rainbows_wait_start
	wait_for_reload
	wait_for_reap
}

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

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

t_done

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rainbows-5.2.1 t/t0014-config-conflict.sh
rainbows-5.2.0 t/t0014-config-conflict.sh
rainbows-5.1.1 t/t0014-config-conflict.sh
rainbows-5.1.0 t/t0014-config-conflict.sh
rainbows-5.0.0.5.ge717 t/t0014-config-conflict.sh
rainbows-5.0.0 t/t0014-config-conflict.sh
rainbows-4.7.0 t/t0014-config-conflict.sh
rainbows-4.6.2 t/t0014-config-conflict.sh
rainbows-4.6.1 t/t0014-config-conflict.sh
rainbows-4.6.0.4.g4108 t/t0014-config-conflict.sh
rainbows-4.6.0 t/t0014-config-conflict.sh
rainbows-4.5.0 t/t0014-config-conflict.sh
rainbows-4.4.3 t/t0014-config-conflict.sh
rainbows-4.4.2 t/t0014-config-conflict.sh
rainbows-4.4.1.1.gd5c8c t/t0014-config-conflict.sh
rainbows-4.4.1 t/t0014-config-conflict.sh
rainbows-4.4.0 t/t0014-config-conflict.sh
rainbows-4.3.1 t/t0014-config-conflict.sh
rainbows-4.3.0 t/t0014-config-conflict.sh
rainbows-4.2.0 t/t0014-config-conflict.sh