Skip to content

Commit

Permalink
Include the chain specs instead of trying to open them by path (parit…
Browse files Browse the repository at this point in the history
…ytech#11625)

This makes it possible to run the tests manually, without them expecting to be run in a special
folder etc.
  • Loading branch information
bkchr authored Jun 14, 2022
1 parent 4037345 commit a9d055d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions client/beefy/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ impl BuildStorage for Genesis {

#[test]
fn beefy_protocol_name() {
let chain_spec = GenericChainSpec::<Genesis>::from_json_file(std::path::PathBuf::from(
"../chain-spec/res/chain_spec.json",
))
let chain_spec = GenericChainSpec::<Genesis>::from_json_bytes(
&include_bytes!("../../chain-spec/res/chain_spec.json")[..],
)
.unwrap()
.cloned_box();

Expand Down
6 changes: 3 additions & 3 deletions client/finality-grandpa/src/communication/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,9 @@ fn local_chain_spec() -> Box<dyn sc_chain_spec::ChainSpec> {
Ok(())
}
}
let chain_spec = GenericChainSpec::<Genesis>::from_json_file(std::path::PathBuf::from(
"../chain-spec/res/chain_spec.json",
))
let chain_spec = GenericChainSpec::<Genesis>::from_json_bytes(
&include_bytes!("../../../chain-spec/res/chain_spec.json")[..],
)
.unwrap();
chain_spec.cloned_box()
}
Expand Down

0 comments on commit a9d055d

Please sign in to comment.