added: launch-pipeline integration tests via build_launch_invocation seam
Phase D of the test overhaul. Extracts a build_launch_invocation seam from launch() so the full launch pipeline (profile loading, inheritsFrom resolution, classpath assembly, template rendering) can be exercised without spawning a real java process or hitting the auth servers. The seam takes resolved auth credentials (LaunchAuth) and returns a LaunchInvocation struct with the final java path, jvm args, classpath, main class, extra args, game args, and working dir. launch() shrinks to a thin wrapper that resolves auth from the account store, calls the seam, and spawns the process. tests/launch_pipeline.rs adds 14 integration tests covering: vanilla modern args; vanilla legacy minecraftArguments; Forge with --add-opens; Forge local-libs preference; Fabric implicit inheritsFrom resolution; NeoForge inheritsFrom; auth credential substitution into game args; version_type substitution; platform classpath separator; rule-disallowed library exclusion; Xms/Xmx from config; default memory fallback; missing meta.json error; missing loader profile error.
This commit is contained in:
1 parent
cc0dde106a
commit
d2e08d818b
3 files changed
+739
-85
No files matched your search
@@ -19,8 +19,6 @@ fn setup_subdir(tmp: &Path, instance: &str, sub: &str) -> PathBuf {
|
||||
// without panicking even though it can't actually unpack metadata.
|
||||
const ZIP_HEADER: &[u8] = b"PK\x03\x04";
|
||||
|
||||
// ---------- shaders ----------
|
||||
|
||||
#[test]
|
||||
fn shaders_empty_dir_returns_empty() {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
@@ -68,7 +66,6 @@ fn shaders_ignores_non_shader_files() {
|
||||
assert_eq!(scan_shaders(tmp.path(), "inst").len(), 1);
|
||||
}
|
||||
|
||||
// ---------- worlds ----------
|
||||
// worlds are always directories (no zip form), so the test shape differs.
|
||||
|
||||
#[test]
|
||||
@@ -133,8 +130,6 @@ fn worlds_sorted_case_insensitive() {
|
||||
assert_eq!(names, vec!["alpha", "Beta", "Zeta"]);
|
||||
}
|
||||
|
||||
// ---------- resource packs ----------
|
||||
|
||||
#[test]
|
||||
fn resource_packs_empty_dir_returns_empty() {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
|
||||
Reference in new issue
Block a user