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§
- Async
Copy Fixture Case - Provider-prepared asynchronous copy request used for cancellation probing.
- Async
File System Contract Suite - Runs asynchronous provider contracts against one isolated fixture.
- Async
Write Fixture Case - Owned request arguments for an asynchronous write cancellation probe.
- Cleanup
Report - Cleanup attempts and their historical failures.
- Contract
Async Copy Failure - Retains a copy failure snapshot and its operation, when admitted.
- Contract
Async Write Failure - Retains a whole-file failure snapshot and its operation, when admitted.
- Contract
Check - One named check in a contract report.
- Contract
Failure - A failure with safe context and its original typed cause.
- Contract
Report - A report containing stable check identities and their outcomes.
- Contract
Run - Retains contract evidence and execution diagnostics in the borrowing suite.
- Contract
Source - Preserves the complete original error while keeping the report Send + Sync.
- Contract
Temp Failure - A failed temporary lifecycle operation whose resource remains available for recovery.
- Contract
Writer Failure - A failed streaming operation whose writer remains available for recovery.
- Copy
Fixture Case - Provider-prepared case that makes one native copy method applicable.
- File
System Contract Suite - Runs synchronous provider contracts against one isolated fixture.
- Fixture
Error - Failure raised by fixture setup or out-of-band observation.
- Write
Fixture Case - A write request; its expected behavior is determined by
WriteScenario.
Enums§
- Async
Copy Cancellation Stage - Cancellation point exercised by an asynchronous copy contract probe.
- Async
Write Cancellation Stage - A provider-owned stage at which an owning write operation may be cancelled.
- Contract
Check Id - Identifies one independently reported provider contract check.
- Contract
Check Outcome - The observable result of one stable contract check.
- Copy
Scenario - The source and destination state required by a copy check.
- Delete
Scenario - Identifies the file state required by a deletion check.
- File
System Contract - One independently executable provider contract phase.
- Fixture
Preparation - Separates a prepared request from applicability and missing instrumentation.
- Fixture
Support - Distinguishes a supported fixture probe from one the fixture cannot offer.
- Read
Scenario - Identifies the initial state needed by one read check.
- Write
Scenario - The write behavior whose request a fixture prepares.
Traits§
- Async
File System Fixture - Supplies an isolated asynchronous facade and optional provider observations.
- Copy
Cancellation Probe - Observes and controls one provider-owned pending copy stage.
- File
System Fixture - Supplies an isolated facade and provider-specific contract observations.
- Write
Cancellation Probe - Controls one provider-owned pending stage of an owning write operation.
Type Aliases§
- Fixture
Future - Runtime-neutral future returned by asynchronous fixture observations.
- Fixture
Result - Result returned by fixture setup and out-of-band observation hooks.