Sha256: 7ea5ea7eb72472bdee1dcda522c6ec68535d8bf20fe0fccc299b4f2407861a2c

Contents?: true

Size: 1.53 KB

Versions: 24

Compression:

Stored size: 1.53 KB

Contents

#!/bin/sh
. ./test-lib.sh

t_plan 8 "client_header_buffer_size tests for $model"

t_begin "setup and startup" && {
	rainbows_setup $model
}

t_begin "fails with zero buffer size" && {
	ed -s $unicorn_config <<EOF
,s/^  client_max_body_size.*/  client_header_buffer_size 0/
w
EOF
	grep "client_header_buffer_size 0" $unicorn_config
	rainbows -D client_header_buffer_size.ru -c $unicorn_config || \
		echo err=$? > $ok
	test x"$(cat $ok)" = "xerr=1"
}

t_begin "fails with negative value" && {
	ed -s $unicorn_config <<EOF
,s/^  client_header_buffer_size.*/  client_header_buffer_size -1/
w
EOF
	grep "client_header_buffer_size -1" $unicorn_config
	rainbows -D client_header_buffer_size.ru -c $unicorn_config || \
		echo err=$? > $ok
	test x"$(cat $ok)" = "xerr=1"
}

t_begin "fails with negative value" && {
	ed -s $unicorn_config <<EOF
,s/^  client_header_buffer_size.*/  client_header_buffer_size -1/
w
EOF
	grep "client_header_buffer_size -1" $unicorn_config
	rainbows -D client_header_buffer_size.ru -c $unicorn_config || \
		echo err=$? > $ok
	test x"$(cat $ok)" = "xerr=1"
}

t_begin "starts with correct value" && {
	ed -s $unicorn_config <<EOF
,s/^  client_header_buffer_size.*/  client_header_buffer_size 16399/
w
EOF
	grep "client_header_buffer_size 16399" $unicorn_config
	rainbows -D client_header_buffer_size.ru -c $unicorn_config
	rainbows_wait_start
}

t_begin "regular TCP request works right" && {
	test x$(curl -sSfv http://$listen/) = x16399
}

t_begin "no errors in stderr" && {
	check_stderr
}

t_begin "shutdown" && {
	kill $rainbows_pid
}

t_done

Version data entries

24 entries across 24 versions & 1 rubygems

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