test(nightly): preserve startup failure without stable fallback (#4911)

This commit is contained in:
Dylan M. Taylor
2026-11-29 15:12:20 -05:00
committed by GitHub
parent be07bd69fd
commit c869fdb23c
+12
View File
@@ -182,6 +182,18 @@ mod tests {
}
}
#[test]
fn failed_profile_preparation_does_not_start_with_stable() {
let tmp = TempDir::new("file-root");
let root = tmp.path().join("not-a-directory");
std::fs::write(&root, b"an ordinary file").unwrap();
let argv = craft_nightly::launch_arguments(&root, &[]);
let result =
craft_nightly::prepare_launch(craft_nightly::BuildFlavor::NightlyV1, &app_spec(), argv, &craft_nightly::StartupOptions::default());
assert!(matches!(result, Err(ProfileError::NotADirectory(_))));
assert_eq!(std::fs::read(&root).unwrap(), b"an ordinary file");
}
#[test]
fn app_spec_preserves_gridcraft_identifiers_and_folder_entries() {
let spec = app_spec();