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 againstcrate::deliverywith an in-memory store. The Go SDK runs the same cases against its own delivery code, so both applyif_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) andslow(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 asoptionssay.- run
- Run every case against the plugin executable at
path. - run_
with - Run every case against the plugin executable at
path, asoptionssay. - run_
with_ env - Like
run, with extra environment variables for every plugin process.