Sha256: 4b1c010347fe45e5532a6166ee918764047f53396fcf6e8b7def50b8b6d6fcef

Contents?: true

Size: 676 Bytes

Versions: 62

Compression:

Stored size: 676 Bytes

Contents

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

t_plan 4 "fooapp.rb inside alt working_directory"

t_begin "setup and start" && {
	unicorn_setup
	rm -rf $t_pfx.app
	mkdir $t_pfx.app

	cat > $t_pfx.app/fooapp.rb <<\EOF
class Fooapp
  def self.call(env)
    [ 200, [%w(Content-Type text/plain), %w(Content-Length 2)], %w(HI) ]
  end
end
EOF
	# the whole point of this exercise
	echo "working_directory '$t_pfx.app'" >> $unicorn_config
	cd /
	unicorn -D -c $unicorn_config -I. fooapp.rb
	unicorn_wait_start
}

t_begin "hit with curl" && {
	body=$(curl -sSf http://$listen/)
}

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

t_begin "response body expected" && {
	test x"$body" = xHI
}

t_done

Version data entries

62 entries across 62 versions & 5 rubygems

Version Path
boourns-unicorn-4.4.9 t/t0005-working_directory_app.rb.sh
unicorn-4.5.0 t/t0005-working_directory_app.rb.sh
unicorn-4.5.0pre1 t/t0005-working_directory_app.rb.sh
boourns-unicorn-4.4.8 t/t0005-working_directory_app.rb.sh
boourns-unicorn-4.4.6 t/t0005-working_directory_app.rb.sh
boourns-unicorn-4.4.5 t/t0005-working_directory_app.rb.sh
boourns-unicorn-4.4.4 t/t0005-working_directory_app.rb.sh
boourns-unicorn-4.4.3 t/t0005-working_directory_app.rb.sh
boourns-unicorn-4.4.2 t/t0005-working_directory_app.rb.sh
boourns-unicorn-4.4.1 t/t0005-working_directory_app.rb.sh
preplay_unicorn-4.3.1.5.ga7df t/t0005-working_directory_app.rb.sh
unicorn-4.4.0 t/t0005-working_directory_app.rb.sh
preplay_unicorn-4.3.1.2.gc450 t/t0005-working_directory_app.rb.sh
unicorn-lb-patch-4.3.1.13.gb7d9 t/t0005-working_directory_app.rb.sh
unicorn-lb-patch-4.3.1.11.g21b8.dirty t/t0005-working_directory_app.rb.sh
unicorn-heroku-4.3.1.1.gc608.dirty t/t0005-working_directory_app.rb.sh
unicorn-4.3.1 t/t0005-working_directory_app.rb.sh
unicorn-4.3.0.2.g4551 t/t0005-working_directory_app.rb.sh
unicorn-4.3.0 t/t0005-working_directory_app.rb.sh
unicorn-4.2.1 t/t0005-working_directory_app.rb.sh