forked from lix-project/lix-installer
d69f335703
* wip * Add dockerfile * Add readme bits * Fix logic inversion * Relax init detection error * Tidying heuristics * Fix doc tests * Mac supports start-daemon false * Get VM tests working * Add instructions * Some target_os flagging * More target flagging * Fix lints * Fixup more mac-only stuff * cfg flag examples too * Fix planner wording * More os specific lint fixing * More refinement on mac and the README * Add new CI jobs to test no-daemon * Use nix-installer-pr to point at branch * Tests with no-init * init/no-daemon are linux only * nix tests support a per-distro all attribute * Add working podman test * Expand docker tests * Add contributing notes * format * Support both podman and docker * Update contributing * Add Windows WSL test script for Ubuntu * format nix tests * More ignores to check-spelling * Add systemd based wsl test * We don't have root-only darwin * Reflect review nits * Reenable tests * Restore mac plan * Flag off os specific tests * Better cfg flagging * Remove dead comments * Rework readme to look better with new sections * Correct codeblock language * Remove some warnings
36 lines
1.3 KiB
Rust
36 lines
1.3 KiB
Rust
use nix_installer::InstallPlan;
|
|
|
|
#[cfg(target_os = "linux")]
|
|
const LINUX_MULTI: &str = include_str!("./fixtures/linux/linux-multi.json");
|
|
#[cfg(target_os = "linux")]
|
|
const STEAM_DECK: &str = include_str!("./fixtures/linux/steam-deck.json");
|
|
#[cfg(target_os = "macos")]
|
|
const DARWIN_MULTI: &str = include_str!("./fixtures/darwin/darwin-multi.json");
|
|
|
|
// Ensure existing plans still parse
|
|
// If this breaks and you need to update the fixture, disable these tests, bump `nix_installer` to a new version, and update the plans.
|
|
#[cfg(target_os = "linux")]
|
|
#[test]
|
|
fn plan_compat_linux_multi() -> eyre::Result<()> {
|
|
let _: InstallPlan = serde_json::from_str(LINUX_MULTI)?;
|
|
Ok(())
|
|
}
|
|
|
|
// Ensure existing plans still parse
|
|
// If this breaks and you need to update the fixture, disable these tests, bump `nix_installer` to a new version, and update the plans.
|
|
#[cfg(target_os = "linux")]
|
|
#[test]
|
|
fn plan_compat_steam_deck() -> eyre::Result<()> {
|
|
let _: InstallPlan = serde_json::from_str(STEAM_DECK)?;
|
|
Ok(())
|
|
}
|
|
|
|
// Ensure existing plans still parse
|
|
// If this breaks and you need to update the fixture, disable these tests, bump `nix_installer` to a new version, and update the plans.
|
|
#[cfg(target_os = "macos")]
|
|
#[test]
|
|
fn plan_compat_darwin_multi() -> eyre::Result<()> {
|
|
let _: InstallPlan = serde_json::from_str(DARWIN_MULTI)?;
|
|
Ok(())
|
|
}
|