Adjust tests for light-clients and normal clients

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2023-05-25 15:21:14 +03:00
parent 5aa0ac880a
commit d6f69ef1aa
+5 -1
View File
@@ -501,9 +501,11 @@ async fn chainhead_unstable_body() {
let extrinsics: Vec<Vec<u8>> = body.block.extrinsics.into_iter().map(|ext| ext.0).collect();
let expected = format!("0x{}", hex::encode(extrinsics.encode()));
#[cfg(not(feature = "unstable-light-client"))]
assert_matches!(event,
#[cfg(not(feature = "unstable-light-client"))]
ChainHeadEvent::Done(done) if done.result == expected
#[cfg(feature = "unstable-light-client")]
ChainHeadEvent::Done(done) if done.value == expected
);
}
@@ -559,6 +561,8 @@ async fn chainhead_unstable_storage() {
#[cfg(not(feature = "unstable-light-client"))]
assert_matches!(event, ChainHeadEvent::<Option<String>>::Done(done) if done.result.is_some());
#[cfg(feature = "unstable-light-client")]
assert_matches!(event, ChainHeadEvent::<Option<String>>::Done(done) if done.value.is_some());
}
#[tokio::test]