Skip to content

Commit

Permalink
Added integration test for RPC abci_query
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Nov 27, 2019
1 parent 573a36b commit 15ddb67
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tendermint/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
/// cargo test -- --ignored
/// ```
mod rpc {
use tendermint::rpc::Client;
use std::str::FromStr;
use tendermint::{abci::Path, rpc::Client};

/// Get the address of the local node
pub fn localhost_rpc_client() -> Client {
Expand All @@ -28,7 +29,12 @@ mod rpc {
#[test]
#[ignore]
fn abci_query() {
// TODO(tarcieri): write integration test for this endpoint
let key = Path::from_str("foo").unwrap();
let abci_query = localhost_rpc_client()
.abci_query(Some(key), vec![], None, false)
.unwrap();
assert_eq!(abci_query.key.as_ref().unwrap(), "foo");
assert_eq!(abci_query.value.as_ref(), None);
}

/// `/block` endpoint
Expand Down

0 comments on commit 15ddb67

Please sign in to comment.