13 lines
744 B
Shell
Executable file
13 lines
744 B
Shell
Executable file
#!/bin/sh
|
|
# The embed kit end to end, in Docker (PHP 8.2 + curl): a fake playground that checks the signatures, the kit in front of it, a browser.
|
|
# tools/embed/tests/test.sh
|
|
set -e
|
|
cd "$(dirname "$0")/.."
|
|
exec docker run --rm -v "$PWD:/kit:ro" -w /kit/tests php:8.2-cli-alpine sh -c '
|
|
rm -rf /tmp/kit-cache /tmp/kit-cache-2 /tmp/fake-hits.log
|
|
php -S 127.0.0.1:9001 fake-playground.php >/tmp/fake.log 2>&1 &
|
|
JUMPHP_EMBED_SERVER=http://127.0.0.1:9001 JUMPHP_EMBED_APP=demo JUMPHP_EMBED_SITE=es_00000000000000000000 JUMPHP_EMBED_SECRET=jes_test-secret \
|
|
JUMPHP_EMBED_BASE=/chat JUMPHP_EMBED_CACHE=/tmp/kit-cache php -S 127.0.0.1:9002 kit-front.php >/tmp/kit.log 2>&1 &
|
|
sleep 1
|
|
php -l ../jumphp-embed.php >/dev/null
|
|
php check.php'
|