fix(test): the backup folder test names a folder the host calls rooted; the portable jobs report every failure

The portable-windows gate has been red on main for four pushes
(7a5cb6873 to 652f9da87). The settings test V-D2 added set
backup.folder to /mnt/backup/books. A backup folder is a folder on the
server's own computer, so the key is checked by the host's path rules,
and on Windows that path names no disk: the check refused it, rightly,
and the test's unwrap panicked. The rule and the code are unchanged;
the test now names a folder the host takes (D:\backup\books there).

cargo test stops at the first failing test binary, so that one test hid
whatever fails after it. The two portable jobs take most of an hour
each; they now run with --no-fail-fast, so one red run shows every
failure.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude committed 2026-11-09 15:17:30 -07:00
1 parent 4da1c5b30f
commit 5cad55023f
3 files changed
+23 -4

No files matched your search

+5 -1
View File
@@ -52,7 +52,11 @@ jobs:
- name: Everything compiles
run: cargo build --workspace --all-targets
- name: Tests
run: cargo test --workspace
# Every failure in one run: this job takes most of an hour, and
# cargo stops at the first failing test binary otherwise, hiding
# whatever fails after it (2026-11-09: four red pushes showed one
# test).
run: cargo test --workspace --no-fail-fast
- name: What the build used
if: always()
shell: bash
+5 -1
View File
@@ -52,7 +52,11 @@ jobs:
- name: Everything compiles
run: cargo build --workspace --all-targets
- name: Tests
run: cargo test --workspace
# Every failure in one run: this job takes most of an hour, and
# cargo stops at the first failing test binary otherwise, hiding
# whatever fails after it (2026-11-09: four red pushes showed one
# test).
run: cargo test --workspace --no-fail-fast
- name: What the build used
if: always()
shell: bash
+13 -2
View File
@@ -39,6 +39,17 @@ fn src() -> Source {
}
}
/// A folder the host calls rooted. `backup.folder` is a folder on the
/// server's own computer, so it is checked by the host's path rules: on
/// Windows `/mnt/backup/books` names no disk and is refused (the
/// portable-windows gate, 2026-11-09), so the test names one the host
/// takes.
const BACKUP_FOLDER: &str = if cfg!(windows) {
r"D:\backup\books"
} else {
"/mnt/backup/books"
};
fn change(k: &str, v: Value) -> Change {
Change {
key: k.into(),
@@ -540,7 +551,7 @@ fn readers_give_the_default_unset_and_the_word_when_set() {
),
("policy.cpa_package_requires_audit", json!("refuse")),
("backup.git_remote", json!("git@git.example:books.git")),
("backup.folder", json!("/mnt/backup/books")),
("backup.folder", json!(BACKUP_FOLDER)),
]);
assert_eq!(set.schedule_convention(), ScheduleConvention::MonthlyEven);
assert_eq!(set.parties(), PartyPolicy::Require);
@@ -552,7 +563,7 @@ fn readers_give_the_default_unset_and_the_word_when_set() {
);
assert_eq!(set.cpa_package_requires_audit(), Some(true));
assert_eq!(set.backup_git_remote(), Some("git@git.example:books.git"));
assert_eq!(set.backup_folder(), Some("/mnt/backup/books"));
assert_eq!(set.backup_folder(), Some(BACKUP_FOLDER));
let warn = settings(&[("policy.cpa_package_requires_audit", json!("warn"))]);
assert_eq!(warn.cpa_package_requires_audit(), Some(false));