Sha256: 2fb722d49b2b33a3db4d1af993266f6c9271ad088ca25b93a7bc772cf6651925

Contents?: true

Size: 1.09 KB

Versions: 31

Compression:

Stored size: 1.09 KB

Contents

#!/bin/sh
. ./test-lib.sh
t_plan 8 "reload restore settings for $model"

t_begin "setup and start" && {
	rtmpfiles orig_config
	rainbows_setup
	cat $unicorn_config > $orig_config
	rainbows -D -c $unicorn_config -l $listen env.ru
	rainbows_wait_start
}

t_begin "HTTP request confirms we're running the correct model" && {
	curl -sSfv http://$listen/ | grep "\"rainbows.model\"=>:$model"
}

t_begin "clobber config and reload" && {
	cat > $unicorn_config <<EOF
stderr_path "$r_err"
EOF
	kill -HUP $rainbows_pid
	wait_for_reload
	wait_for_reap
}

t_begin "HTTP request confirms we're on the default model" && {
	curl -sSfv http://$listen/ | \
	  grep "\"rainbows.model\"=>:Base" >/dev/null
}

t_begin "restore config and reload" && {
	cat $orig_config > $unicorn_config
	> $r_err
	kill -HUP $rainbows_pid
	rainbows_wait_start
	wait_for_reload
	wait_for_reap
}

t_begin "HTTP request confirms we're back on the correct model" && {
	curl -sSfv http://$listen/ | \
	  grep "\"rainbows.model\"=>:$model" >/dev/null
}

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

t_begin "check stderr" && {
	check_stderr
}

t_done

Version data entries

31 entries across 31 versions & 1 rubygems

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