lix-installer/tests/plan.rs
Ana Hobden 7ec5148e6d
Add time machine exclusions for Mac (#480)
* Add time machine exclusions for Mac

* Prod CI

* Stub out mac test for a remote build

* Add plan changes

* wip

* Move the exclusions to be later

* Fixups

* Use pathbufs

* Import pathbuf

* Update test plans
2023-05-31 13:36:44 -07:00

36 lines
1.3 KiB
Rust

use nix_installer::InstallPlan;
#[cfg(target_os = "linux")]
const LINUX: &str = include_str!("./fixtures/linux/linux.json");
#[cfg(target_os = "linux")]
const STEAM_DECK: &str = include_str!("./fixtures/linux/steam-deck.json");
#[cfg(target_os = "macos")]
const MACOS: &str = include_str!("./fixtures/macos/macos.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() -> eyre::Result<()> {
let _: InstallPlan = serde_json::from_str(LINUX)?;
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_macos() -> eyre::Result<()> {
// let _: InstallPlan = serde_json::from_str(MACOS)?;
// Ok(())
// }