Skip to content

Commit

Permalink
fix: runtime tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Grigoriy Simonov committed Sep 7, 2023
1 parent c3d8db8 commit 78ef2a9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pallets/common/src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl CrossAddress {
} else if self.sub == Default::default() {
Ok(Some(T::CrossAccountId::from_eth(self.eth)))
} else {
Err(format!("All fields of cross account is non zeroed {:?}", self).into())
Err(format!("All fields of cross account is non zeroed {self:?}").into())
}
}

Expand Down
2 changes: 2 additions & 0 deletions runtime/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

fp-evm = { workspace = true }

frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-xcm = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion runtime/tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ impl pallet_evm::Config for Test {
type OnChargeTransaction = ();
type FindAuthor = ();
type BlockHashMapping = SubstrateBlockHashMapping<Self>;
type TransactionValidityHack = ();
type Timestamp = Timestamp;
type GasLimitPovSizeRatio = ConstU64<0>;
type OnCheckEvmTransaction<E: From<fp_evm::InvalidEvmTransactionError>> = ();
}
impl pallet_evm_coder_substrate::Config for Test {}

Expand Down
2 changes: 1 addition & 1 deletion tests/src/util/globalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ const fundFilenamesWithRetries = (retriesLeft: number): Promise<boolean> => {
globalSetup().catch(e => {
console.error('Setup error');
console.error(e);
process.exit(1)
process.exit(1);
});
6 changes: 2 additions & 4 deletions tests/src/xcm/xcmQuartz.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,8 @@ describeXCM('[XCM] Integration test: Exchanging tokens with Karura', () => {
maliciousXcmProgramSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
});

await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => {
return event.messageHash == maliciousXcmProgramSent.messageHash
&& event.outcome.isFailedToTransactAsset;
});
await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.Fail, event => event.messageHash == maliciousXcmProgramSent.messageHash
&& event.outcome.isFailedToTransactAsset);

targetAccountBalance = await helper.balance.getSubstrate(targetAccount.address);
expect(targetAccountBalance).to.be.equal(0n);
Expand Down

0 comments on commit 78ef2a9

Please sign in to comment.