#!/bin/bash # Run the Lacuna Perl integration test suite. # # MUST run inside the server container: it needs the app server on :5000, # MySQL + memcached + beanstalkd reachable, and the Carton deps baked into the # image's ./local. From the host: # # The tests POST their JSON-RPC calls to $LACUNA_TEST_SERVER_URL (see # t/TestHelper.pm), which defaults below to this container's own server. You can # point it elsewhere, but the empire-create tests (t/010_Empire.t) still need to # run from inside server so the server sees the client as 127.0.0.1 -- # the IP the test seeds the create-empire captcha under. set -eu : "${LACUNA_TEST_SERVER_URL:=http://server:5000/}" export LACUNA_TEST_SERVER_URL cd /home/lacuna/server # -It : put t/ on @INC so `use TestHelper` resolves regardless of each file's # own `use lib '../lib'` / '..' lines and regardless of cwd. # -Ilib: the application code. if [ "$#" -gt 0 ]; then exec prove -Ilib -It -r "$@" fi # Default: numbered tests + regression tests + middleware tests. # t/long_running/ is deliberately excluded -- it takes many minutes. exec prove -Ilib -It t/*.t t/bugs/*.t t/middleware/*.t