Skip to content

Commit

Permalink
Add cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles committed Dec 18, 2024
1 parent 35c8861 commit 55d8636
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/integration_tests/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub mod storage_index;
pub mod user;
pub mod user_index;

const INIT_CYCLES_BALANCE: u128 = 1_000 * T;
pub const INIT_CYCLES_BALANCE: u128 = 1_000 * T;

pub fn create_canister(env: &mut PocketIc, controller: Principal) -> CanisterId {
let canister_id = env.create_canister_with_settings(Some(controller), None);
Expand Down
6 changes: 5 additions & 1 deletion backend/integration_tests/src/setup.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::client::{create_canister, create_canister_with_id, install_canister};
use crate::client::{create_canister, create_canister_with_id, install_canister, INIT_CYCLES_BALANCE};
use crate::env::VIDEO_CALL_OPERATOR;
use crate::utils::tick_many;
use crate::{client, wasms, CanisterIds, TestEnv, T};
Expand Down Expand Up @@ -489,6 +489,10 @@ fn install_canisters(env: &mut PocketIc, controller: Principal) -> CanisterIds {
let local_group_index_canister_id = subnet.local_group_index;
let notifications_canister_id = subnet.notifications_canister;

env.add_cycles(local_user_index_canister_id, INIT_CYCLES_BALANCE);
env.add_cycles(local_group_index_canister_id, INIT_CYCLES_BALANCE);
env.add_cycles(notifications_canister_id, INIT_CYCLES_BALANCE);

let airdrop_bot_init_args = airdrop_bot_canister::init::Args {
admins: vec![controller],
user_index_canister_id,
Expand Down

0 comments on commit 55d8636

Please sign in to comment.