-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds an endpoint to query the currently active config (i.e. `InternetIdentityInit`).
- Loading branch information
1 parent
f4a3980
commit edd4b57
Showing
9 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use canister_tests::api::internet_identity as api; | ||
use canister_tests::framework::{env, install_ii_canister_with_arg, II_WASM}; | ||
use internet_identity_interface::internet_identity::types::{ | ||
ArchiveConfig, InternetIdentityInit, RateLimitConfig, | ||
}; | ||
use pocket_ic::CallError; | ||
|
||
#[test] | ||
fn should_retain_anchor_on_user_range_change() -> Result<(), CallError> { | ||
let env = env(); | ||
let config = InternetIdentityInit { | ||
assigned_user_number_range: Some((3456, 798977)), | ||
archive_config: Some(ArchiveConfig { | ||
module_hash: [17; 32], | ||
entries_buffer_limit: 123789, | ||
polling_interval_ns: 659871258, | ||
entries_fetch_limit: 33, | ||
}), | ||
canister_creation_cycles_cost: Some(123), | ||
register_rate_limit: Some(RateLimitConfig { | ||
time_per_token_ns: 99, | ||
max_tokens: 874, | ||
}), | ||
max_inflight_captchas: Some(456), | ||
}; | ||
|
||
let canister_id = install_ii_canister_with_arg(&env, II_WASM.clone(), Some(config.clone())); | ||
|
||
assert_eq!(api::config(&env, canister_id)?, config); | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters