diff --git a/substrate/client/beefy/src/tests.rs b/substrate/client/beefy/src/tests.rs index 1d035a6a44..b5ff27c808 100644 --- a/substrate/client/beefy/src/tests.rs +++ b/substrate/client/beefy/src/tests.rs @@ -75,9 +75,9 @@ impl BuildStorage for Genesis { #[test] fn beefy_protocol_name() { - let chain_spec = GenericChainSpec::::from_json_file(std::path::PathBuf::from( - "../chain-spec/res/chain_spec.json", - )) + let chain_spec = GenericChainSpec::::from_json_bytes( + &include_bytes!("../../chain-spec/res/chain_spec.json")[..], + ) .unwrap() .cloned_box(); diff --git a/substrate/client/finality-grandpa/src/communication/tests.rs b/substrate/client/finality-grandpa/src/communication/tests.rs index e41d21fc06..0ec5092a2a 100644 --- a/substrate/client/finality-grandpa/src/communication/tests.rs +++ b/substrate/client/finality-grandpa/src/communication/tests.rs @@ -551,9 +551,9 @@ fn local_chain_spec() -> Box { Ok(()) } } - let chain_spec = GenericChainSpec::::from_json_file(std::path::PathBuf::from( - "../chain-spec/res/chain_spec.json", - )) + let chain_spec = GenericChainSpec::::from_json_bytes( + &include_bytes!("../../../chain-spec/res/chain_spec.json")[..], + ) .unwrap(); chain_spec.cloned_box() }