aboutsummaryrefslogtreecommitdiffstats
path: root/tests/migrations.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-01 06:11:56 +0000
committertv <tv@krebsco.de>2026-12-01 06:11:56 +0000
commit7cb8b752619f17fd29be1b5496ced107d41e79e9 (patch)
tree46907416ed5fa40291f189cbc82f116293fdc98f /tests/migrations.rs
parent60da3a663ed070c1e6c5d2a1b171e316a0395bbd (diff)
docs: a submission goes into the incoming directory whole
Names starting with a dot are skipped there, so a provider copies a submission under one and renames it within the incoming directory: a receptor looking at it meanwhile (enstate.service, a check) never sees half a submission. Said in the design, the module's incomingDir, the store; and a test that a dot name is left alone.
Diffstat (limited to 'tests/migrations.rs')
-rw-r--r--tests/migrations.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/migrations.rs b/tests/migrations.rs
index e66895c..c892f72 100644
--- a/tests/migrations.rs
+++ b/tests/migrations.rs
@@ -350,6 +350,8 @@ fn incoming_submissions() {
std::fs::create_dir_all(&incoming).unwrap();
std::fs::rename(dir, incoming.join(name)).unwrap();
};
+ // Half copied, under a dot name: skipped, and left alone.
+ std::fs::create_dir_all(host.root.join("state/incoming/.half/channels")).unwrap();
// A first deployment: nothing but a waiting submission.
put("1", &rotate(&host, "first", "a", b"A"));
let check = host.migrate(&s2, true);
@@ -370,6 +372,8 @@ fn incoming_submissions() {
assert_eq!(host.view("a", "a").unwrap(), b"A");
assert!(host.snapshot("secrets").is_some());
assert!(!host.root.join("state/incoming/1").exists());
+ assert!(host.root.join("state/incoming/.half").exists());
+ assert_eq!(migration.incoming.len(), 1);
// The deploy created the state directory, readable by all; it is root's now.
use std::os::unix::fs::PermissionsExt;
let mode = std::fs::metadata(host.root.join("state"))