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.
27 lines
640 B
Bash
Executable file
27 lines
640 B
Bash
Executable file
#!/bin/bash
|
|
|
|
. ./config.sh
|
|
|
|
ifErr() {
|
|
RESCODE=$?
|
|
if [[ $RESCODE != 0 ]]; then
|
|
echo $1
|
|
exit $RESCODE
|
|
fi
|
|
}
|
|
|
|
$DATAGEN -s custom --custom-config=./fb-1371-datagen.yaml --pilosa.index=fb1371 --pilosa.batch-size=100 --pilosa.hosts=$1
|
|
ifErr "datagenning fb1371"
|
|
|
|
RES1=$( authcurl $1/index/fb1371/query -d 'Max(ts)' | jq '.results[0].timestampValue' )
|
|
ifErr "getting Max 1"
|
|
|
|
RES2=$( authcurl $1/index/fb1371/query -d 'Max(ts)' | jq '.results[0].timestampValue' )
|
|
ifErr "getting Max 2"
|
|
|
|
if [[ $RES1 != $RES2 ]]; then
|
|
echo "different Max after two calls"
|
|
echo "first: $RES1"
|
|
echo "second: $RES2"
|
|
exit 1
|
|
fi
|