Skip to main content

Module test_utils

Module test_utils 

Source
Expand description

An in-memory provider, fault injection and the shared provider conformance suite.

Structs§

Conformance
Run identical object, range, prefix and immutable-create checks on any provider. The caller supplies the capability at construction, like production composition.
Faults
Faults applied to the next calls, including accepted parts with lost replies.
Garble
Faults on the way to the device that change one byte of a response.
MemoryProvider
In-memory native calls used beneath the shared storage connection.
MemoryStorageBuilder
Shared storage fixture choices; production providers do not use these defaults.
RefusedRefresh
Custody for tokens installed directly on a fake connection: a rejection cannot be refreshed and reaches the caller as Authentication.
RequestWatch
Hears each request this provider’s connections attempt, counted from the first, failed ones included (MemoryStorage::subscribe_requests).
UnrestrictedPublications
Authority for raw provider fixtures, which seed objects without a sync owner.

Enums§

BodyFailure
Failures after response metadata has arrived.
MemoryRequest
Each attempted native call in the in-memory provider, before fault injection. This provider has one page per listing and no implicit metadata lookups.

Constants§

DETECTED_S3_SETTINGS
What memory’s detection reports where the location needs detection.
DEVICE
The device a test connection writes for, unless a test names another.
STORE_ID
The store shared by the deterministic storage and format fixtures.

Functions§

admitted_part
Admit bytes as session’s next part as a connection does with no cooldown live and every destination open, for a fake Storage of a test: the part must fit the session, and a plan’s first part marks it.
conforming_detection
A detection whose every observation agrees with these settings.

Type Aliases§

MemoryStorage
Clones share a provider’s durable objects and sessions across simulated crashes. Publication is timestamped by the injected clock and retains the upload’s identity after pending parts are discarded. Faults can lose part/completion replies or expire pending sessions without losing published objects.