Skip to main content

Module conformance

Module conformance 

Source
Expand description

The protocol conformance suite. The cases are data, in conformance/protocol.json (a request sequence and the properties its replies must have), so a runner in any language can check a plugin against them; this module is the Rust runner, driving a plugin binary over stdin and stdout. conformance/delivery.json holds the delivery rules both SDKs share, checked by delivery. Every first-party plugin runs the suite in its tests. A package executable (dre-plugin-<package>) is checked once per plugin it provides.

Every message a plugin sends is also checked against the message schema (crate::schema). A case that doesn’t apply to a plugin (another kind, a capability it doesn’t advertise, a session the caller didn’t describe) is listed as skipped, with the reason.

Modules§

delivery
The delivery cases (conformance/delivery.json), run against crate::delivery with an in-memory store. The Go SDK runs the same cases against its own delivery code, so both apply if_exists, temporary names, temp_dir, retries and numbered names the same way.

Structs§

Check
One case’s outcome for one plugin.
Options
How to run the suite.
Session
What the session cases run: a connection that opens, and statements by role. The roles the cases use are rows (a result set of at least 3 rows), empty (a result set of no rows), no_result (a statement without a result set), error (a statement that fails) and slow (a statement that runs for at least a few seconds, until cancelled).

Constants§

PROTOCOL_CASES
The protocol cases, as published.

Functions§

assert_conforms
Panic with a readable report unless every check passes. For use in plugin tests.
assert_conforms_with
assert_conforms, run as options say.
run
Run every case against the plugin executable at path.
run_with
Run every case against the plugin executable at path, as options say.
run_with_env
Like run, with extra environment variables for every plugin process.