mirror of
https://github.com/storytold/gridcraft.git
synced 2026-12-01 18:26:05 -06:00
test(nightly): preserve startup failure without stable fallback (#4911)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user