Skip to content

Commit

Permalink
Merge pull request #1624 from CosmWasm/ibc_querier-cleanup
Browse files Browse the repository at this point in the history
IBC Querier follow-ups
  • Loading branch information
webmaster128 authored Mar 7, 2023
2 parents c9cb354 + e32896d commit 8950461
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to

## [Unreleased]

### Added

- cosmwasm-std: Add an IBC querier implementation to `testing::MockQuerier`
([#1620], [#1624]).

[#1620]: https://github.com/CosmWasm/cosmwasm/pull/1620
[#1624]: https://github.com/CosmWasm/cosmwasm/pull/1624

### Fixed

- all: Fix `backtraces` feature for newer versions of Rust. This still requires
Expand Down
6 changes: 3 additions & 3 deletions packages/std/src/testing/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ mod tests {
let ibc = IbcQuerier::new("myport", &[chan1.clone(), chan2.clone()]);

// query channels matching "my_port" (should match both above)
let query = &&IbcQuery::ListChannels {
let query = &IbcQuery::ListChannels {
port_id: Some("my_port".to_string()),
};
let raw = ibc.query(query).unwrap().unwrap();
Expand All @@ -1354,7 +1354,7 @@ mod tests {
let ibc = IbcQuerier::new("myport", &[chan1, chan2]);

// query channels matching "myport" (should be none)
let query = &&IbcQuery::ListChannels { port_id: None };
let query = &IbcQuery::ListChannels { port_id: None };
let raw = ibc.query(query).unwrap().unwrap();
let res: ListChannelsResponse = from_binary(&raw).unwrap();
assert_eq!(res.channels, vec![]);
Expand All @@ -1368,7 +1368,7 @@ mod tests {
let ibc = IbcQuerier::new("myport", &[chan1]);

// query channels matching "myport" (should be none)
let query = &&IbcQuery::PortId {};
let query = &IbcQuery::PortId {};
let raw = ibc.query(query).unwrap().unwrap();
let res: PortIdResponse = from_binary(&raw).unwrap();
assert_eq!(res.port_id, "myport");
Expand Down

0 comments on commit 8950461

Please sign in to comment.