test: prove P1 configuration process end to end
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||
if [[ $# -lt 1 || "$1" != "integration" || $# -gt 2 || ( $# -eq 2 && "$2" != "--keep" ) ]]; then
|
||||
printf 'usage: %s integration [--keep]\n' "$0" >&2
|
||||
exit 2
|
||||
fi
|
||||
for command in node npm git; do command -v "$command" >/dev/null || { printf 'missing command: %s\n' "$command" >&2; exit 127; }; done
|
||||
THT_BIN="${THT_BIN:-$repo_root/harness/.venv/bin/tht}"
|
||||
[[ "$THT_BIN" = /* && -x "$THT_BIN" ]] || { printf 'THT_BIN must be an absolute executable path\n' >&2; exit 127; }
|
||||
export THT_BIN
|
||||
npm --prefix "$repo_root/backend" run build
|
||||
set +e
|
||||
node "$repo_root/backend/scripts/p1-acceptance.mjs" "$@"
|
||||
status=$?
|
||||
set -e
|
||||
exit "$status"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||
npm --prefix "$repo_root/backend" run build
|
||||
node --test "$repo_root/backend/scripts/p1-acceptance.test.mjs"
|
||||
Reference in New Issue
Block a user