Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(cron): gate legacy import tests behind legacy-import feature

Steven Enamakel55e21828d1ee
diff --git a/crates/openhuman-core/src/cron/store_tests.rs b/crates/openhuman-core/src/cron/store_tests.rs
index c01bf89581..230feb3512 100644
--- a/crates/openhuman-core/src/cron/store_tests.rs
+++ b/crates/openhuman-core/src/cron/store_tests.rs
@@ -252,12 +252,13 @@ async fn a_job_whose_agent_is_not_live_stays_dormant() {
);
}
+#[cfg(feature = "legacy-import")]
fn legacy_fixture() -> std::path::PathBuf {
std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
.join("src/storage/import/fixtures/tinyflows/workspace/cron/jobs.db")
}
-#[cfg(feature = "storage-sqlite")]
+#[cfg(all(feature = "storage-sqlite", feature = "legacy-import"))]
#[test]
fn a_legacy_jobs_db_is_imported_by_the_storage_importer_and_left_untouched() {
let tmp = TempDir::new().unwrap();
diff --git a/crates/openhuman-core/src/storage/layout/plan.rs b/crates/openhuman-core/src/storage/layout/plan.rs
index ad6ebfa73b..8e22acd421 100644
--- a/crates/openhuman-core/src/storage/layout/plan.rs
+++ b/crates/openhuman-core/src/storage/layout/plan.rs
@@ -262,6 +262,6 @@ pub fn join(base: &Path, rel: &str) -> PathBuf {
.fold(base.to_path_buf(), |p, part| p.join(part))
}
-#[cfg(all(test, feature = "storage-sqlite"))]
+#[cfg(all(test, feature = "storage-sqlite", feature = "legacy-import"))]
#[path = "plan_tests.rs"]
mod tests;