24 lines
743 B
Rust
24 lines
743 B
Rust
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
use molotov_bootstrap::launcher::{LaunchOptions, Launcher};
|
|
use molotov_bootstrap::region::ServerRegion;
|
|
use tempfile::tempdir;
|
|
|
|
#[test]
|
|
fn test_launcher_prepare_flow() {
|
|
let temp = tempdir().unwrap();
|
|
let root = temp.path().to_path_buf();
|
|
|
|
let launcher = Launcher::new(root);
|
|
let options = LaunchOptions {
|
|
place_id: Some(1818),
|
|
safe_mode: false,
|
|
region: ServerRegion::Europe,
|
|
instance_id: "default".to_string(),
|
|
fps_cap: Some(144),
|
|
vram_skip_mips: true,
|
|
};
|
|
|
|
let plan = launcher.prepare_launch(options).expect("Should prepare launch plan");
|
|
assert!(plan.fflags_path.exists());
|
|
assert_eq!(plan.place_id, Some(1818));
|
|
}
|