aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/replay_batch.sh
blob: 3b6ae873b9ee04045a6ad2cfa81a09d436fb2f22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

set -euo pipefail

DUMP_DIR="/tmp/batch_dumps"
SQ_ROOT_URL="http://localhost:9000"

cd $DUMP_DIR
for file in *.zip; do
  base=${file%.zip}
  url=$(cat ${base}.txt)
  echo "base=$base, url=$url"

  curl -u admin:admin -F report=@$DUMP_DIR/${base}.zip ${SQ_ROOT_URL}${url}
done