aboutsummaryrefslogtreecommitdiff
path: root/api/tests/latest_known_mined_block.sh
blob: 1ef55a1109a4b79d835e76e176819d4f7c2f6ea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash
#
PROGRAM="$(basename $0)"
printf '[%s]\n' "$PROGRAM"
printf "TEST\t/slatest\n"
printf "\t01:\tendpoint"
A="$(curl -s http://127.0.0.1:8610/v0/slatest 2>/dev/null)"
B="$(ak schain --get-latest)"
if [ "$A" == "$B" ]
then
    printf '\t\t\033[0;32mPASSED\033[0;0m'
else
    printf '\t\t\033[0;31mFAILED\033[0;0m'
fi
printf "\n"