Skip to main content

Crate cortexkit_bus_testkit

Crate cortexkit_bus_testkit 

Source
Expand description

Private, disposable broker and daemon processes for module integration tests.

CK_SUBC_BIN and CK_BUS_BIN must name test builds, never installed binaries. Every executable is staged through cortexkit_test_support::ckdev_binary. See the crate README for a complete setup and the missing-binary skip policy.

Modules§

signer
Throwaway signing roots served as claustrum for private-bus tests.
trust
Throwaway operator, system-account and account signing keys.

Structs§

BusOptions
BusServer
DaemonOptions
Module
A module the private subc daemon spawns and supervises, like a production module entry in subc.jsonc. Environment entries augment the daemon’s inherited environment; do not override its isolated XDG homes.
PreloadedAccount
An additional account for tests that exercise user JWTs without ck-bus bootstrap.
PrivateDaemon
A binary daemon and a throwaway, in-client-process claustrum signer. The broker must outlive this value. No operator vault or installed daemon is used.

Enums§

RigError
A missing prerequisite is skippable; a broken rig is not.

Constants§

LOOPBACK

Functions§

ck_bus_binary
ck_subc_binary
nats_server_bin
Returns a staged executable and its reported version. An old or unrecognizable server is a configuration error, not a missing prerequisite.
new_machine_id
skip_or_fail
Call in an error arm, then return from the test. CI can require prerequisites with CK_BUS_TESTKIT_REQUIRE=1; all non-prerequisite errors always panic.
subc_config
Build JSON (also valid JSONC) with a reserved ckbus and caller-supplied modules. All program paths are staged copies, even when a module is initially disabled.
write_machine_id
Write the identity in the data home the binary daemon uses, not the caller’s.