File: smoke-test

package info (click to toggle)
ruby-rack 3.1.18-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,068 kB
  • sloc: ruby: 15,131; sh: 12; makefile: 7; javascript: 1
file content (20 lines) | stat: -rwxr-xr-x 323 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

exec 2>&1

set -ex

appdir=${AUTOPKGTEST_TMP:-/tmp}/app
mkdir $appdir
cd $appdir

cat > config.ru <<EOF
run(lambda { |request| [200, {'content-type' => 'text/html'}, ['Hello, world!']]})
EOF

rackup --pid smoke.pid --daemonize
sleep 5

curl -s http://localhost:9292/ | grep 'Hello, world'

kill $(cat smoke.pid)