diff options
| author | tv <tv@krebsco.de> | 2026-11-18 11:14:56 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-18 12:23:19 +0100 |
| commit | ecfed5d7e344c617f582d1d91c7395a210a70192 (patch) | |
| tree | b3bd6e23037220d641aa7ffb500dfa60b12ef2a7 /src/federation | |
| parent | b6a2649f54741e88a886fe8f64e916415e8a4b72 (diff) | |
files: a test's scratch directory goes when the test ends
`scratch_dir` gives a guard (`Scratch`) that removes the directory with
all it holds when dropped, the test passing or failing. Each test keeps
it for as long as it uses the directory; the dashboard's browser check
writes its page into one.
Diffstat (limited to 'src/federation')
| -rw-r--r-- | src/federation/held.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/federation/held.rs b/src/federation/held.rs index 3ca74a9..abb3d30 100644 --- a/src/federation/held.rs +++ b/src/federation/held.rs @@ -1795,7 +1795,8 @@ mod tests { for event in [&write, &beside, &proposal, &yes] { put(&mut doc, event); } - let record = crate::files::scratch_dir("held-votes-above").join("makefu.json"); + let dir = crate::files::scratch_dir("held-votes-above"); + let record = dir.join("makefu.json"); let version = Version::read(&first.json()).unwrap(); let mut begun = Record::begin(Id::of(&root), "makefu", &version); begun.began = Id::of(b"before the federation").to_string(); |
