Make tests compatible with pg bool output
This commit is contained in:
@@ -99,11 +99,18 @@ function sql() {
|
|||||||
then
|
then
|
||||||
if [[ "${RESULT}" != "$3" ]]
|
if [[ "${RESULT}" != "$3" ]]
|
||||||
then
|
then
|
||||||
|
# Deal with bool values from pg, returned as t/f instead of true/false
|
||||||
|
if [[ "$3" == "true" && "${RESULT}" == "t" ]] || [[ "$3" == "false" && "${RESULT}" == "f" ]]
|
||||||
|
then
|
||||||
|
# do nothing, test ok
|
||||||
|
true
|
||||||
|
else
|
||||||
log_error "QUERY '${QUERY}' expected result '${3}' but got '${RESULT}'"
|
log_error "QUERY '${QUERY}' expected result '${3}' but got '${RESULT}'"
|
||||||
set_failed
|
set_failed
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function log_info()
|
function log_info()
|
||||||
|
|||||||
Reference in New Issue
Block a user