MCPcopy Create free account
hub / github.com/dfinity/orbit / too_large_wasm

Function too_large_wasm

tests/integration/src/system_upgrade_tests.rs:187–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185
186#[test]
187fn too_large_wasm() {
188 let TestEnv {
189 env, canister_ids, ..
190 } = setup_new_env();
191
192 let (base_chunk, module_extra_chunks) =
193 upload_canister_chunks_to_asset_canister(&env, vec![42_u8; 102 << 20], 1 << 20);
194
195 // create system upgrade request from chunks
196 let system_upgrade_operation =
197 RequestOperationInput::SystemUpgrade(SystemUpgradeOperationInput {
198 target: SystemUpgradeTargetDTO::UpgradeStation,
199 module: base_chunk,
200 module_extra_chunks: Some(module_extra_chunks),
201 arg: None,
202 take_backup_snapshot: None,
203 });
204
205 do_failed_system_upgrade(
206 &env,
207 &canister_ids,
208 system_upgrade_operation,
209 "Wasm extra chunks length 105_906_176 exceeds the maximum wasm length 104_857_600",
210 );
211}
212
213#[test]
214fn system_upgrade_from_chunks() {

Callers

nothing calls this directly

Calls 4

setup_new_envFunction · 0.85
do_failed_system_upgradeFunction · 0.85
SystemUpgradeClass · 0.50

Tested by

no test coverage detected