diff --git a/tests/integration/api-nodes.sh b/tests/integration/api-nodes.sh new file mode 100755 index 000000000..5cc36931f --- /dev/null +++ b/tests/integration/api-nodes.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +CONFIG_FILE=$(mktemp) +FETCHED_NODES=$(mktemp) + +cat > ${CONFIG_FILE} < ${FETCHED_NODES} + +# Shutdown VILLASnode +kill $! + +# Compare local config with the fetched one +jq -e '.response[0].name == "testnode1" and .response[0].type == "websocket" and .response[0].id == 0 and (.response | length == 2)' ${FETCHED_NODES} > /dev/null +RC=$? + +rm -f ${CONFIG_FILE} ${FETCHED_NODES} + +exit $RC \ No newline at end of file