upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/grasp-audit/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'grasp-audit/src/bin')
-rw-r--r--grasp-audit/src/bin/grasp-audit.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/grasp-audit/src/bin/grasp-audit.rs b/grasp-audit/src/bin/grasp-audit.rs
index 9bd7826..becc4b2 100644
--- a/grasp-audit/src/bin/grasp-audit.rs
+++ b/grasp-audit/src/bin/grasp-audit.rs
@@ -37,9 +37,11 @@ enum Commands {
37 #[arg(long)] 37 #[arg(long)]
38 nsec: Option<String>, 38 nsec: Option<String>,
39 39
40 /// Read-only mode: skip write steps, only check existing repos 40 /// Create a test repo on the relay to verify the full write path
41 /// (publish events, git push, verify refs match state).
42 /// Requires write access; use --nsec for whitelisted relays.
41 #[arg(long, default_value_t = false)] 43 #[arg(long, default_value_t = false)]
42 read_only: bool, 44 create_repo: bool,
43 }, 45 },
44 46
45 /// Run audit tests against a server 47 /// Run audit tests against a server
@@ -90,7 +92,7 @@ async fn main() -> Result<()> {
90 timeout, 92 timeout,
91 watch, 93 watch,
92 nsec, 94 nsec,
93 read_only, 95 create_repo,
94 } => { 96 } => {
95 // Parse nsec if provided 97 // Parse nsec if provided
96 let keys = if let Some(nsec_str) = nsec { 98 let keys = if let Some(nsec_str) = nsec {
@@ -102,6 +104,9 @@ async fn main() -> Result<()> {
102 None 104 None
103 }; 105 };
104 106
107 // read_only is the default; --create-repo opts into the write path
108 let read_only = !create_repo;
109
105 // Overall probe timeout: min(20s, watch_interval) to prevent 110 // Overall probe timeout: min(20s, watch_interval) to prevent
106 // overlapping runs under --watch or cron scheduling. 111 // overlapping runs under --watch or cron scheduling.
107 let overall_secs = match watch { 112 let overall_secs = match watch {