commit bb2a16356704ab439b979bc0ed73853e2bca606e
parent 03b4f136bf7fdbd379c64bdd0ddba8701224f0c6
Author: triesap <tyson@radroots.org>
Date: Sat, 25 Apr 2026 06:54:58 +0000
runtime: cover repo-local farm config boundary
Diffstat:
1 file changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/runtime/farm_config.rs b/src/runtime/farm_config.rs
@@ -497,6 +497,26 @@ mod tests {
}
#[test]
+ fn workspace_config_write_requires_repo_local_profile() {
+ let dir = tempdir().expect("tempdir");
+ let paths = sample_paths("interactive_user", dir.path());
+ let document = sample_document(FarmConfigScope::Workspace);
+ let repo_local_root = dir.path().join("infra/local/runtime/radroots");
+
+ let error = write(&paths, FarmConfigScope::Workspace, &document)
+ .expect_err("interactive workspace farm config should fail");
+
+ match error {
+ RuntimeError::Config(message) => {
+ assert!(message.contains("requires repo_local path profile"));
+ assert!(message.contains("interactive_user"));
+ }
+ other => panic!("expected config error, got {other:?}"),
+ }
+ assert!(!repo_local_root.exists());
+ }
+
+ #[test]
fn load_rejects_scope_mismatch() {
let dir = tempdir().expect("tempdir");
let paths = sample_paths("repo_local", dir.path());