Elffuss BraidHub

utopia-ia/elffuss-braid public

verify test: skip the unwritable record where modes do not hold

As root, in a container, a directory of mode 0555 takes new files all the
same, so the record verify cannot write is written, and the test saw a
revert where it expected an error.
Changeset2e9b2e7907ff447d6993d7792b36bf38ac2e491b43a4105f256b1fb3313ceb4b
AuthorKikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 15:53 +02:00
CommitterKikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 15:53 +02:00
Parents35653c88f694

Browse the files at this changeset

1 file changed

modified crates/cli/tests/verify.rs +5 −0
@@ -654,6 +654,11 @@
654654 let record = r.dir.join(".braid/verify");
655655 std::fs::create_dir(&record).unwrap();
656656 std::fs::set_permissions(&record, std::fs::Permissions::from_mode(0o555)).unwrap();
657+ if std::fs::write(record.join("probe"), "").is_ok() {
658+ // Modes do not hold here, as for root in a container: nothing to
659+ // test.
660+ return;
661+ }
657662 let out = r.verify(&["--revert", "--reruns", "0"], 1);
658663 std::fs::set_permissions(&record, std::fs::Permissions::from_mode(0o755)).unwrap();
659664 assert_eq!(out["outcome"], "error");