fix macos integration test

pull/2624/head
Lucas Nogueira 1 week ago
parent 940ed70420
commit 201a001f0a
No known key found for this signature in database
GPG Key ID: A05EE2227C581CD7

@ -1143,7 +1143,7 @@ impl Update {
if let Some(mut stdin) = child.stdin.take() { if let Some(mut stdin) = child.stdin.take() {
// Write password to stdin // Write password to stdin
writeln!(stdin, "{}", password)?; writeln!(stdin, "{password}")?;
} }
let status = child.wait()?; let status = child.wait()?;

@ -171,15 +171,33 @@ fn test_cases(
} }
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
fn bundle_paths( fn test_cases(
root_dir: &Path, root_dir: &Path,
_version: &str, _version: &str,
v1compatible: bool, target: String,
) -> Vec<(BundleTarget, PathBuf)> { ) -> Vec<(BundleTarget, PathBuf, Option<String>, Vec<i32>)> {
vec![( vec![
BundleTarget::App, (
root_dir.join("target/debug/bundle/macos/app-updater.app"), BundleTarget::App,
)] root_dir.join("target/debug/bundle/macos/app-updater.app"),
Some(target.clone()),
vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE],
),
// update with installer
(
BundleTarget::App,
root_dir.join("target/debug/bundle/macos/app-updater.app"),
Some(format!("{target}-{}", BundleTarget::App.name())),
vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE],
),
// no update
(
BundleTarget::App,
root_dir.join("target/debug/bundle/macos/app-updater.app"),
None,
vec![ERROR_EXIT_CODE],
),
]
} }
#[cfg(target_os = "ios")] #[cfg(target_os = "ios")]

Loading…
Cancel
Save