aboutsummaryrefslogtreecommitdiff
path: root/api/tests/latest_known_mined_block.sh
blob: 168767e8027ebe1d6d46cb272cc9537c370a5ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/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"