Skip to content

Commit

Permalink
Add more /abci_info test fixtures (#1164)
Browse files Browse the repository at this point in the history
The fixtures exercise how various fields in the response may be missing.
  • Loading branch information
mzabaluev committed Jul 27, 2022
1 parent 8e51941 commit a2b33f6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/tests/gaia_fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn incoming_fixtures() {
.unwrap();
let content = fs::read_to_string(&json_file).unwrap();
match file_name {
"abci_info" => {
"abci_info_0" | "abci_info_1" | "abci_info_2" => {
let r = endpoint::abci_info::Response::from_string(content);
assert!(r.is_ok(), "{:?}", r)
}
Expand Down
11 changes: 11 additions & 0 deletions rpc/tests/gaia_fixtures/incoming/abci_info_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"id": "279cb095-9064-4620-bcaa-3c9383847575",
"jsonrpc": "2.0",
"result": {
"response": {
"version": "v7.0.0",
"last_block_app_hash": "vMfcSlXF/bB/xdsaQeFALAzVoY6AKqiFwchFz9ZUguc=",
"last_block_height": "154"
}
}
}
8 changes: 8 additions & 0 deletions rpc/tests/gaia_fixtures/incoming/abci_info_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "279cb095-9064-4620-bcaa-3c9383847575",
"jsonrpc": "2.0",
"result": {
"response": {
}
}
}

0 comments on commit a2b33f6

Please sign in to comment.