Initial commit: Converge portfolio rationalization app
Next.js app for mapping a customer's competitive tool landscape onto our portfolio and building the consolidation business case: assessment workbench, customer report and Word export, product catalog, competitive knowledge base, dossier import, shareable landscape questionnaires with a review inbox, tool-footprint and business-unit value analysis, and an implementation timeline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
45
scripts/test.sh
Executable file
45
scripts/test.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
# Runs the API test suites against a dev server on :3500.
|
||||
# Each suite starts from a freshly seeded knowledge base so runs are repeatable.
|
||||
set -uo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
BASE=http://127.0.0.1:3500
|
||||
curl -sf "$BASE/api/catalog" -o /dev/null || { echo "Start the dev server first: npm run dev"; exit 1; }
|
||||
|
||||
reseed() {
|
||||
rm -f data/knowledge-base.json
|
||||
node scripts/seed-kb.mjs > /dev/null
|
||||
}
|
||||
|
||||
fail=0
|
||||
|
||||
echo "=== dossier parser ==="
|
||||
./scripts/build-test-lib.sh
|
||||
node scripts/test-dossier.mjs || fail=1
|
||||
|
||||
echo
|
||||
echo "=== knowledge base: learning ==="
|
||||
reseed
|
||||
node scripts/test-kb-learning.mjs || fail=1
|
||||
|
||||
echo
|
||||
echo "=== knowledge base: pruning ==="
|
||||
reseed
|
||||
curl -s "$BASE/api/assessments/northwind-financial" > /tmp/prt-nw.json
|
||||
curl -s -X PUT -H "Content-Type: application/json" -d @/tmp/prt-nw.json \
|
||||
"$BASE/api/assessments/northwind-financial" -o /dev/null
|
||||
node scripts/test-kb-pruning.mjs || fail=1
|
||||
|
||||
echo
|
||||
echo "=== customer-report redaction ==="
|
||||
node scripts/test-report-leak.mjs || fail=1
|
||||
|
||||
# Leave the knowledge base in a clean, fully-learned state.
|
||||
reseed
|
||||
curl -s -X PUT -H "Content-Type: application/json" -d @/tmp/prt-nw.json \
|
||||
"$BASE/api/assessments/northwind-financial" -o /dev/null
|
||||
|
||||
echo
|
||||
[ $fail -eq 0 ] && echo "All suites passed." || echo "Some suites failed."
|
||||
exit $fail
|
||||
Reference in New Issue
Block a user