Add Iroh relay mode config

This commit is contained in:
Eric Wendland 2026-05-16 03:17:45 +02:00
commit 0f2ad755d9
13 changed files with 210 additions and 21 deletions

View file

@ -59,6 +59,11 @@ fn geth_init_in_temp_home() {
assert!(home.path().join("geth.sqlite").exists());
assert!(home.path().join("identity/agent.ed25519").exists());
assert!(home.path().join("config.toml").exists());
assert!(
std::fs::read_to_string(home.path().join("config.toml"))
.expect("read config")
.contains("relay_mode = \"default\"")
);
}
#[test]
@ -68,6 +73,11 @@ fn geth_status_against_running_daemon() {
return;
}
assert!(run_geth(home.path(), &["init"]).status.success());
std::fs::write(
home.path().join("config.toml"),
"[iroh]\nrelay_mode = \"disabled\"\n",
)
.expect("write config");
let mut daemon = spawn_daemon(home.path());
wait_for_socket(&home.path().join("run/geth.sock"));
@ -84,6 +94,7 @@ fn geth_status_against_running_daemon() {
assert!(stdout.contains("geth daemon: running"));
assert!(stdout.contains("agent:"));
assert!(stdout.contains("endpoint:"));
assert!(stdout.contains("iroh relay: disabled"));
}
#[test]