CodeVetter · Repo Unpack · Testing signals
diesel-rs/diesel
Tests and CI were inspected, not executed; no passing result or measured coverage is asserted. The repository combines Rust runtime tests, compile-failure diagnostics, procedural-macro snapshots, CLI subprocess tests, and fuzzing workflows. The inspected tests verify concrete database and generated-code behavior, with backend-specific conditions. This inventory is bounded and does not establish exhaustive coverage or whole-repository test gaps.
- diesel_tests registers integration modules for CRUD, associations, joins, raw SQL, transactions, migrations, instrumentation, types, views, and window functions, with some modules gated by backend features.
- Transaction tests inspect cross-connection visibility and rollback on returned errors; the visibility test explicitly excludes SQLite because it requires a file-backed database, and the rollback-error test is SQLite-specific.
- Despite its trybuild.rs filename, the compile-failure harness uses ui_test against tests/fail, normalizes diagnostic paths/text, and enables output blessing whenever BLESS exists; an inspected fixture rejects integer/string comparisons.
- Procedural-macro tests expand tokens, parse the result with syn, apply FixupVisitor, format through prettyplease, and assert insta snapshots; these assertions check generated text rather than database execution.
- CLI tests register database and migration command suites; migration_run_runs_pending_migrations checks command success, emitted migration output, and actual table creation.
- Schema tests compare CLI/config-generated output with insta snapshots and conditionally compile it in a temporary Cargo project; check_compile=false deliberately skips that compilation assertion for selected cases.
- CI defines a four-backend, five-platform stable matrix plus Linux beta/nightly entries, invokes cargo xtask run-tests, skips doctests/example-schema checks outside Linux, and uploads coverage outside merge_group events.
- Fuzz CI runs harness tests on PRs/pushes, but cargo-fuzz target execution is workflow_dispatch-only; separate ClusterFuzzLite PR jobs specify address sanitization and 600 seconds, while audit CI runs cargo deny check.