Skip to content

Commit

Permalink
feat: zombienet config and small test addition
Browse files Browse the repository at this point in the history
  • Loading branch information
JuaniRios committed May 17, 2023
1 parent e8f5c6f commit 3f03074
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
30 changes: 30 additions & 0 deletions polimec-skeleton/base-rococo-local.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[settings]
timeout = 1000
provider = "native"

[relaychain]
default_command = "polkadot"
chain = "rococo-local"

[[relaychain.nodes]]
name = "alice"

[[relaychain.nodes]]
name = "bob"

[[relaychain.nodes]]
name = "charlie"

[[relaychain.nodes]]
name = "dave"

[[parachains]]
id = 2000

[[parachains.collators]]
name = "collator1"
command = "./target/release/parachain-template-node"

[[parachains.collators]]
name = "collator2"
command = "./target/release/parachain-template-node"
9 changes: 7 additions & 2 deletions polimec-skeleton/pallets/funding/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1222,15 +1222,20 @@ mod auction_round_success {
let necessary_funding = (bid_info.0 * bid_info.1) + (bid_info.0 * bid_info.1 * bid_info.2.unwrap() as u128);
let mut bids_made: UserToBid = vec![];
let starting_bid_block = test_env.current_block();
assert_eq!(test_env.current_block(), starting_bid_block);
let blocks_to_bid = test_env.current_block()..candle_end_block;
let blocks_to_bid = starting_bid_block..candle_end_block;

// Reserved funds do not count toward existential deposit anymore
let existential_deposit = ExistentialDeposit::get();
test_env.fund_accounts(vec![(bidding_account, existential_deposit)]);

for _block in blocks_to_bid {
assert_eq!(
auctioning_project.get_project_info().project_status,
ProjectStatus::AuctionRound(AuctionPhase::Candle)
);
test_env.fund_accounts(vec![(bidding_account, necessary_funding)]);
let bids: UserToBid = vec![(bidding_account, bid_info)];

auctioning_project
.bid_for_users(bids.clone())
.expect("Candle Bidding should not fail");
Expand Down

0 comments on commit 3f03074

Please sign in to comment.