summaryrefslogtreecommitdiffstats
path: root/src/db/invariants.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/invariants.rs')
-rw-r--r--src/db/invariants.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/db/invariants.rs b/src/db/invariants.rs
index 9853003..e2648fa 100644
--- a/src/db/invariants.rs
+++ b/src/db/invariants.rs
@@ -4,6 +4,14 @@ use crate::error::Result;
// ------------------------------------------------------- invariant helpers --
+/// Repo entries whose candidate was never approved.
+///
+/// Test-tier only, and deliberately so: this is an invariant the schema does
+/// not enforce and production does not check, so the only thing that keeps it
+/// true is that a test asserts it on every run. It is gated rather than moved
+/// to `tests/common` because reading it needs this module's private helpers,
+/// and widening those to let a test out would be the wrong trade.
+#[cfg(feature = "test-support")]
pub fn unapproved_index_entries(db: &Db) -> Result<Vec<String>> {
db.read(|c| {
let mut stmt = c.prepare(