chore: add new utilities and scripts for manual validations

This commit is contained in:
garethgeorge
2024-09-09 00:22:06 -07:00
parent c4198619aa
commit 426af294cd
7 changed files with 177 additions and 0 deletions

15
scripts/testing/run-fresh.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
BASEDIR=$(dirname "$0")
TEMPDIR=$(mktemp -d)
function cleanup {
echo "Removing temp dir: $TEMPDIR"
rm -rf $TEMPDIR
}
trap cleanup EXIT
echo "Temp dir: $TEMPDIR"
go run $BASEDIR/../../cmd/backrest --config-file=$TEMPDIR/config.json --data-dir=$TEMPDIR/data

12
scripts/testing/run-in-dir.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
BASEDIR=$(dirname "$0")
RUNDIR=$1
if [ -z "$RUNDIR" ]; then
echo "Usage: $0 <run-dir>"
exit 1
fi
go run $BASEDIR/../../cmd/backrest --config-file=$RUNDIR/config.json --data-dir=$RUNDIR