mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
This is a bit complicated and entangled, sorry. First, we squash the auth-based smoke tests into the regular smoke tests; we just run all the tests with auth on and that way we don't need to spin up an entire separate cluster of machines just to run a single query against them. We improve the error detection, and standardize the jq-to-get-config code. The purpose of this is to try to make sure that, if we actually hit a failure and get "null" for a host name, we report *that* as an error, rather than running ahead and producing 20+ separate reports that ssh failed because it couldn't find a host named null.
38 lines
907 B
Bash
Executable file
38 lines
907 B
Bash
Executable file
#!/bin/bash
|
|
|
|
. ./config.sh
|
|
|
|
# datagen some timestamps onto DATANODE0 in index fb_1332_test
|
|
$DATAGEN -s custom --custom-config=./fb-1332-datagen.yaml --pilosa.index=fb1332 --pilosa.batch-size=100 --pilosa.hosts=$1
|
|
if (( $? != 0 )); then
|
|
echo "couldn't datagen"
|
|
exit 1
|
|
fi
|
|
|
|
# take a backup
|
|
featurebase backup --host=$1 -o=fb1332.bak --index=fb1332
|
|
if (( $? != 0 )); then
|
|
echo "couldn't backup"
|
|
exit 1
|
|
fi
|
|
|
|
# delete that index
|
|
if [[ $( authcurl -XDELETE $1/index/fb1332| jq '.error' ) != "null" ]]; then
|
|
echo "couldn't delete index"
|
|
exit 1
|
|
fi
|
|
|
|
# fb restore
|
|
featurebase restore --host=$1 -s=fb1332.bak
|
|
if (( $? != 0 )); then
|
|
echo "couldn't restore"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
# datagen some more
|
|
$DATAGEN -s custom --custom-config=./fb-1332-datagen.yaml --pilosa.index=fb1332 --pilosa.batch-size=100 --pilosa.hosts=$1
|
|
if (( $? != 0 )); then
|
|
echo "couldn't ingest a second time"
|
|
exit 1
|
|
fi
|