mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-12 15:51:01 +00:00
make smoketest setup check for empty strings
Apparently terraform can give us output saying that it succeded, but give us an empty string for an IP address, which doesn't actually let us use the IP address. Check for that case too in our overly fancy setup. This is a precursor to figuring out what's going wrong in a way that lets us fix it more properly. Also, request values, but don't instant-exit if they aren't present, so we can actually do the retries.
This commit is contained in:
parent
e4177d24d6
commit
4104577f6d
1 changed files with 23 additions and 6 deletions
|
|
@ -34,16 +34,33 @@ while ! $okay && [ $tries -le $max_tries ] ; do
|
|||
terraform output -json > outputs.json
|
||||
echo "Outputs:"
|
||||
cat outputs.json
|
||||
must_get_value outputs.json TMP_I .ingest_ips 0 '"value"' 0
|
||||
must_get_value outputs.json TMP_D .data_node_ips 0 '"value"' 0
|
||||
get_value outputs.json TMP_I .ingest_ips 0 '"value"' 0
|
||||
get_value outputs.json TMP_D .data_node_ips 0 '"value"' 0
|
||||
echo "TF status: $tf, ingest_ips $TMP_I, data_node_ips $TMP_D"
|
||||
case $TMP_I.$TMP_D in
|
||||
*null*) echo >&2 "looks like we failed, null in IPs."
|
||||
tries=$(expr $tries + 1)
|
||||
okay_i=false
|
||||
okay_d=false
|
||||
case $TMP_I in
|
||||
null) echo >&2 "looks like we failed, null in ingest IPs."
|
||||
;;
|
||||
*) okay=true
|
||||
"") echo >&2 "looks like we failed, empty string in ingest IPs."
|
||||
;;
|
||||
*) okay_i=true
|
||||
;;
|
||||
esac
|
||||
case $TMP_D in
|
||||
null) echo >&2 "looks like we failed, null in data IPs."
|
||||
;;
|
||||
"") echo >&2 "looks like we failed, empty string in data IPs."
|
||||
;;
|
||||
*) okay_d=true
|
||||
;;
|
||||
esac
|
||||
if $okay_i && $okay_d; then
|
||||
okay=true
|
||||
else
|
||||
echo >&2 "retrying"
|
||||
tries=$(expr $tries + 1)
|
||||
fi
|
||||
done
|
||||
echo "okay $okay, tries $tries"
|
||||
if ! $okay; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue