Skip to main content

Crate ic_testkit

Crate ic_testkit 

Source
Expand description

Focused PocketIC test-harness utilities for Internet Computer canisters.

Import native PocketIC clients and DTOs from ic_testkit::pocket_ic. pic adds optional typed Wire calls, extension traits for installation, diagnostics and snapshots, startup errors, caller-owned managed-server startup and bounded readiness polling. It does not provide a simulator wrapper or a host-wide runtime lock.

Deterministic test principals through fake_principal are available on every target. The client and pic helpers are native-only.

Modules§

pic
PocketIC host-test harness extensions.
pocket_ic
Maintained PocketIC 16.1 client implementation; see ../upstream/NOTICE.md. The client is async-only and uses the caller’s Tokio runtime. Build with an explicit server URL and await operations. Explicitly await PocketIc::drop before releasing a borrowed server; Rust Drop performs no I/O.

Functions§

fake_principal
Deterministically derive a test Principal from seed.