#!/bin/bash # The MIT License (MIT) # # Copyright (C) 2026 Scott Duensing # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # 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