#!/bin/bash # run.sh -- the DVX package server's tests, as singemaster's are run: fixtures made, the server # started on a port of its own with a configuration of its own, the suites run against it, the # server stopped. Then both services in one calog process, each answering on its own port. # # server/test/run.sh (from anywhere; needs bin/host/dvxpkg from a DVX build, and calog) # # Exit status 0 when every suite passed. set -u cd "$(dirname "$0")/.." || exit 1 CALOG=${CALOG:-$HOME/claude/calog/bin/calog} SINGE=${SINGE_HOME:-$(cd ../../singemaster && pwd)} DVXPKG=$(cd .. && pwd)/bin/host/dvxpkg PORT=18101 MASTER_PORT=18102 ADMIN=testoperatortoken0123456789abcdef DATA=$(pwd)/test/data rm -rf "$DATA" && mkdir -p "$DATA/stage" # The repository's key pair (its secret stays here, as on the operator's computer) and a publisher's "$DVXPKG" keygen "DVX Test Repository" "$DATA/REPO" > /dev/null "$DVXPKG" keygen "Acme Test" "$DATA/ACME" > /dev/null # package