Skip to content

Commit cd97820

Browse files
committed
test: simple smoke-test of container, using bats
1 parent ad760e1 commit cd97820

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

test.bats

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,32 @@ get_second_block_id() {
1515
}
1616

1717
@test "celestia-appd is producing blocks" {
18+
ok="false"
1819
for i in {1..30}; do
1920
run get_second_block_id
2021
if [ $status == 0 ]; then
22+
ok="true"
2123
break
2224
fi
2325
sleep 1
2426
done
27+
$($ok)
2528
}
2629

30+
get_head_proposer_address() {
31+
curl -s http://127.0.0.1:26659/head | grep proposer_address
32+
}
33+
34+
2735
@test "celestia-node is processing blocks" {
36+
ok="false"
2837
for i in {1..30}; do
29-
run curl -s GET http://127.0.0.1:26659/head 2>&1
38+
run get_head_proposer_address
3039
if [ $status == 0 ]; then
40+
ok="true"
3141
break
3242
fi
3343
sleep 1
3444
done
45+
$($ok)
3546
}

0 commit comments

Comments
 (0)