Expand description
PocketIC host-test harness extensions.
Import the client and DTOs directly from ic_platform::pocket_ic.
This module owns Testkit’s extension traits and policy types.
Construct and own ic_platform::pocket_ic::PocketIc instances normally, then import individual
extension traits or prelude for installation, diagnostics and snapshots.
Import the call functions, startup configuration and polling helpers explicitly.
Native simulator operations remain upstream inherent methods.
PocketIcManagedServer can explicitly own one exact caller-selected
server child for a serial suite. No type serializes independent instances or
downloads a server implicitly. On Unix, server_assets owns explicit
authenticated provisioning and admission; the published
ic-testkit-server setup / check commands delegate to that implementation.
Modules§
- prelude
- All
PocketICextension traits, and no data types. - server_
assets - Explicit, release-bound
PocketICassets for Rust fixtures and the CLI.
Structs§
- Baseline
Pool Outcome - One successful acquisition’s slot, timings and preparation disposition.
- Baseline
Pool Timings - Timings for one baseline-pool acquisition.
- Cached
Pocket IcBaseline - One owned
PocketICinstance/server record with snapshots and caller metadata. - Cached
Pocket IcBaseline Pool - Caller-owned runtime-capacity pool of independently restorable
PocketICbaselines. - Cached
Pocket IcBaseline Pool Guard - Exclusive lease of one validated pooled
PocketICbaseline. - Canister
Diagnostic LogRecord - One canister-log record retained as bounded lossy UTF-8 text.
- Canister
Diagnostic Logs - Successfully fetched canister logs after bounded text conversion.
- Canister
Diagnostics Batch Entry - One ordered labeled entry in a collect-all diagnostics batch.
- Canister
Diagnostics Batch Report - Ordered entries from a sequential collect-all diagnostics batch.
- Canister
Diagnostics Report - Independent status and log outcomes for one diagnostic collection.
- Canister
Diagnostics Request - Exact controller-aware inputs for one best-effort diagnostic collection.
- Canister
LogRender Limits - Explicit bounds applied when canister logs are converted to diagnostic text.
- Canister
Snapshot Target - One canister and exact management-call sender used for snapshot capture.
- Controller
Snapshots - Deterministically ordered snapshots retaining each successful capture sender.
- Install
Spec - Inputs and diagnostic context for one generic canister installation.
- Labeled
Canister Diagnostics Request - One caller-labeled exact diagnostic request in a collect-all batch.
- Pocket
IcInstance - An upstream instance together with the server owned by its construction.
- Pocket
IcManaged Server - Caller-owned
PocketICserver process with bounded startup and output capture. - Pocket
IcManaged Server Output - Bounded lossy UTF-8 output captured from a managed
PocketICserver. - Pocket
IcOperation Error - Captured
PocketICoperation failure, retaining transport classification. - Pocket
IcStartup Error - Original startup failure, bounded server output and typed cleanup failures.
- Reset
Policies - Fixed non-snapshot reset policies, supplied independently by a recipe and its reset.
- Reset
Receipt - Typed reset guarantees actually achieved by one preparation pass.
- Reset
Requirements - Typed reset guarantees required by one fixture recipe.
- Retry
Policy - Retry limits and simulated cooldown for install-code operations.
- Snapshot
Cleanup Failure - Failure to remove a snapshot while rolling back a partial capture.
- Standalone
Canister Fixture - One caller-built
PocketICinstance/server owner and one installed canister. - Standalone
Canister Install Error - Failed standalone install retaining the caller-created instance and optional server.
- Standalone
Canister Recipe - Snapshot-only recipe for one caller-built, installed canister.
Enums§
- Baseline
Pool Contract Error - Contract failure while verifying recipe reset evidence.
- Baseline
Pool Disposition - Whether a baseline-pool lease was built, restored, or rebuilt.
- Baseline
Pool Error - Failure to acquire a validated baseline-pool lease.
- Baseline
Pool Preparation Error - One failed recipe or contract stage while preparing a baseline slot.
- Baseline
Preparation Stage - Recipe stage associated with a structured preparation failure.
- Canister
Install Error - Failed creation, funding, or installation with its original operation error.
- Controller
Snapshot Error - Structured controller-snapshot failure.
- Extra
Canister Policy - Extra-canister handling required or achieved by one reset.
- Failure
Disposition - Recipe decision for a failed restored-slot preparation stage.
- Pocket
IcCall Failure - A rejected management call or a captured
PocketICoperation panic. - Pocket
IcStartup Config - Explicit bounded source and policy for one
PocketICstartup. - Pocket
IcStartup Failure - Original failure, independent of output capture and cleanup outcomes.
- Prepared
Baseline - Whether validation is observing a newly built or restored baseline.
- Rebuild
Reason - Why an invalid or failed slot was reconstructed.
- Reset
Domain Kind - Reset domain whose handling is declared by a pooled baseline recipe.
- Snapshot
Restore Funding - Caller-selected cycle funding applied immediately before snapshot restore.
- State
Reset Policy - Generic handling for reset domains without a more specific policy.
- Tick
Until Error - A caller-owned readiness check failed or exhausted its simulated round budget.
- Time
Reset Policy PocketICtime handling required or achieved by one reset.
Constants§
- DEFAULT_
CANISTER_ LOG_ BYTE_ LIMIT - Default maximum aggregate raw canister-log bytes retained in diagnostics.
- DEFAULT_
CANISTER_ LOG_ RECORD_ LIMIT - Default maximum number of canister-log records retained in diagnostics.
- POCKET_
IC_ SERVER_ VERSION - The server selected by this Testkit release’s explicit provisioning CLI.
Traits§
- Canister
Install Ext - Generic canister installation and structured install-code retry policy.
- Pocket
IcBaseline Recipe - Caller-owned build, preflight and non-snapshot reset policy for one pooled baseline.
- Pocket
IcDiagnostics Ext - Reusable structured
PocketICfailure diagnostics. - Pocket
IcSnapshot Ext - Exact-sender capture and restore of related canister snapshots.
Functions§
- advance_
and_ tick - Advance simulated time once, then deliver exactly the caller-selected ticks.
- is_
dead_ pocket_ ic_ transport_ error - Recognize
PocketICtransport failures in typed causes and request-error text. - pocket_
ic_ server_ requirement - Human-readable stable server range accepted by
supports_pocket_ic_server. Provisioning’s exact reviewed artifact version is selected independently. - supports_
pocket_ ic_ server - Whether a successful server version probe satisfies Testkit’s protocol policy.
- tick_
until - Check a caller-owned predicate, advancing simulated time and ticking while pending.
- try_
pocket_ ic_ call - Execute one synchronous
PocketICcall, retaining rejection or transport failure. - try_
pocket_ ic_ operation - Execute one synchronous
PocketICoperation, returning recognized transport panics.