diff --git a/client/tests/integration/mod.rs b/client/tests/integration/mod.rs index 52f80c54882..58e32ecdec5 100644 --- a/client/tests/integration/mod.rs +++ b/client/tests/integration/mod.rs @@ -12,6 +12,7 @@ mod multisignature_transaction; mod offline_peers; mod pagination; mod permissions; +mod query; mod restart_peer; mod transfer_asset; mod tx_history; diff --git a/client/tests/integration/query.rs b/client/tests/integration/query.rs new file mode 100644 index 00000000000..74dab1e8eb9 --- /dev/null +++ b/client/tests/integration/query.rs @@ -0,0 +1,34 @@ +#![allow(clippy::restriction)] + +use eyre::Result; +use iroha_client::client; +// use iroha_core::config::Configuration; +use iroha_data_model::prelude::*; +use parity_scale_codec::Encode; +use test_network::{Peer as TestPeer, *}; + +#[test] +fn find_all_domains_regression_test() -> Result<()> { + let (_rt, _peer, mut test_client) = ::start_test_with_runtime(); + wait_for_genesis_committed(vec![test_client.clone()], 0); + // let pipeline_time = Configuration::pipeline_time(); + + // Given + + let normal_domain_name = "sora"; + let create_domain = RegisterBox::new(IdentifiableBox::from(Domain::test(normal_domain_name))); + test_client.submit(create_domain)?; + + let reply = test_client.request(FindDomainById::new( + DomainId::new("genesis").expect("Valid"), + ))?; + println!("{:#?}", reply); + let reply = test_client.request(FindAccountsByDomainId::new( + DomainId::new("genesis").expect("Valid"), + ))?; + println!("{:#?}", reply); + println!("{}", String::from_utf8_lossy(&reply.encode())); + let reply = test_client.request(FindAllAccounts::new())?; + println!("{:#?}", reply); + Ok(()) +} diff --git a/data_model/primitives/src/small.rs b/data_model/primitives/src/small.rs index 15e96f35559..0e944bcaa6c 100644 --- a/data_model/primitives/src/small.rs +++ b/data_model/primitives/src/small.rs @@ -60,8 +60,9 @@ mod small_string { impl IntoSchema for SmallStr { fn type_name() -> String { - String::type_name() + "SmallString".to_owned() } + fn schema(map: &mut MetaMap) { String::schema(map); } @@ -217,7 +218,7 @@ mod small_vector { impl> IntoSchema for SmallVec { fn type_name() -> String { - Vec::::type_name() + format!("SmallVec<{}>", T::type_name()) } fn schema(map: &mut MetaMap) {