Skip to main content

Crate qubit_fs_testkit

Crate qubit_fs_testkit 

Source
Expand description

Stateful contract suites for qubit-fs provider implementations.

ⓘ
use qubit_fs_testkit::assert_copy_contract;

A provider supplies its own isolated fixture and runs the public suite:

use qubit_fs_testkit::FileSystemContract;
use qubit_fs_testkit::FileSystemContractSuite;

let fixture = support::RustdocSyncFixture::new();
let mut suite = FileSystemContractSuite::new(&fixture);
let run = suite.run_contract(FileSystemContract::Properties);
run.assert_satisfied();
assert!(run.cleanup().completed());

Macros§

register_async_file_system_contract_tests
Registers one independently named asynchronous test for every contract phase.
register_file_system_contract_tests
Registers one independently named synchronous test for every contract phase.

Structs§

AsyncCopyFixtureCase
Provider-prepared asynchronous copy request used for cancellation probing.
AsyncFileSystemContractSuite
Runs asynchronous provider contracts against one isolated fixture.
AsyncWriteFixtureCase
Owned request arguments for an asynchronous write cancellation probe.
CleanupReport
Cleanup attempts and their historical failures.
ContractAsyncCopyFailure
Retains a copy failure snapshot and its operation, when admitted.
ContractAsyncWriteFailure
Retains a whole-file failure snapshot and its operation, when admitted.
ContractCheck
One named check in a contract report.
ContractFailure
A failure with safe context and its original typed cause.
ContractReport
A report containing stable check identities and their outcomes.
ContractRun
Retains contract evidence and execution diagnostics in the borrowing suite.
ContractSource
Preserves the complete original error while keeping the report Send + Sync.
ContractTempFailure
A failed temporary lifecycle operation whose resource remains available for recovery.
ContractWriterFailure
A failed streaming operation whose writer remains available for recovery.
CopyFixtureCase
Provider-prepared case that makes one native copy method applicable.
FileSystemContractSuite
Runs synchronous provider contracts against one isolated fixture.
FixtureError
Failure raised by fixture setup or out-of-band observation.
WriteFixtureCase
A write request; its expected behavior is determined by WriteScenario.

Enums§

AsyncCopyCancellationStage
Cancellation point exercised by an asynchronous copy contract probe.
AsyncWriteCancellationStage
A provider-owned stage at which an owning write operation may be cancelled.
ContractCheckId
Identifies one independently reported provider contract check.
ContractCheckOutcome
The observable result of one stable contract check.
CopyScenario
The source and destination state required by a copy check.
DeleteScenario
Identifies the file state required by a deletion check.
FileSystemContract
One independently executable provider contract phase.
FixturePreparation
Separates a prepared request from applicability and missing instrumentation.
FixtureSupport
Distinguishes a supported fixture probe from one the fixture cannot offer.
ReadScenario
Identifies the initial state needed by one read check.
WriteScenario
The write behavior whose request a fixture prepares.

Traits§

AsyncFileSystemFixture
Supplies an isolated asynchronous facade and optional provider observations.
CopyCancellationProbe
Observes and controls one provider-owned pending copy stage.
FileSystemFixture
Supplies an isolated facade and provider-specific contract observations.
WriteCancellationProbe
Controls one provider-owned pending stage of an owning write operation.

Type Aliases§

FixtureFuture
Runtime-neutral future returned by asynchronous fixture observations.
FixtureResult
Result returned by fixture setup and out-of-band observation hooks.