From 55d8636839ac9d4c462eca9a72f6527085e40e56 Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Wed, 18 Dec 2024 10:30:50 +0000 Subject: [PATCH] Add cycles --- backend/integration_tests/src/client/mod.rs | 2 +- backend/integration_tests/src/setup.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/integration_tests/src/client/mod.rs b/backend/integration_tests/src/client/mod.rs index 1893f8630e..025da359a2 100644 --- a/backend/integration_tests/src/client/mod.rs +++ b/backend/integration_tests/src/client/mod.rs @@ -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); diff --git a/backend/integration_tests/src/setup.rs b/backend/integration_tests/src/setup.rs index 59dfb61147..f6b5d8578b 100644 --- a/backend/integration_tests/src/setup.rs +++ b/backend/integration_tests/src/setup.rs @@ -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}; @@ -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,