From facb9a1a60dd1e0cffb9cb3e2afa1f7ef7daef09 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 22 Aug 2023 14:23:56 -0400 Subject: [PATCH] tests/inst: Update to latest ostree-ext (And glib, etc.) --- tests/inst/Cargo.toml | 2 +- tests/inst/src/destructive.rs | 8 ++++---- tests/inst/src/sysroot.rs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/inst/Cargo.toml b/tests/inst/Cargo.toml index c8773ad3..ff030b22 100644 --- a/tests/inst/Cargo.toml +++ b/tests/inst/Cargo.toml @@ -20,7 +20,7 @@ serde_json = "1.0" sh-inline = "0.4.0" anyhow = "1.0" tempfile = "3.1.0" -ostree-ext = { version = "0.9" } +ostree-ext = { version = "0.11" } libtest-mimic = "0.5.0" twoway = "0.2.1" hyper = { version = "0.14", features = ["runtime", "http1", "http2", "tcp", "server"] } diff --git a/tests/inst/src/destructive.rs b/tests/inst/src/destructive.rs index eb04d68b..3fbbe92c 100644 --- a/tests/inst/src/destructive.rs +++ b/tests/inst/src/destructive.rs @@ -287,7 +287,7 @@ fn parse_and_validate_reboot_mark>( generate_update(&firstdeploy.checksum)?; // Update the target state let srvrepo_obj = ostree::Repo::new(&gio::File::for_path(SRVREPO)); - srvrepo_obj.open(gio::NONE_CANCELLABLE)?; + srvrepo_obj.open(gio::Cancellable::NONE)?; commitstates.target = srvrepo_obj.resolve_rev(TESTREF, false)?.unwrap().into(); } else if commitstates.booted == commitstates.orig || commitstates.booted == commitstates.prev { println!( @@ -357,9 +357,9 @@ fn impl_transaction_test>( // Gather the expected possible commits let mut commitstates = { let srvrepo_obj = ostree::Repo::new(&gio::File::for_path(SRVREPO)); - srvrepo_obj.open(gio::NONE_CANCELLABLE)?; + srvrepo_obj.open(gio::Cancellable::NONE)?; let sysrepo_obj = ostree::Repo::new(&gio::File::for_path("/sysroot/ostree/repo")); - sysrepo_obj.open(gio::NONE_CANCELLABLE)?; + sysrepo_obj.open(gio::Cancellable::NONE)?; CommitStates { booted: booted_commit.to_string(), @@ -569,7 +569,7 @@ pub(crate) fn itest_transactionality() -> Result<()> { sysroot.load(cancellable.as_ref())?; assert!(sysroot.is_booted()); let booted = sysroot.booted_deployment().expect("booted deployment"); - let commit: String = booted.csum().expect("booted csum").into(); + let commit: String = booted.csum().into(); // We need this static across reboots let srvrepo = Path::new(SRVREPO); let firstrun = !srvrepo.exists(); diff --git a/tests/inst/src/sysroot.rs b/tests/inst/src/sysroot.rs index 19377134..6e65f35f 100644 --- a/tests/inst/src/sysroot.rs +++ b/tests/inst/src/sysroot.rs @@ -26,9 +26,9 @@ pub(crate) fn itest_sysroot_ro() -> Result<()> { let booted = sysroot.booted_deployment().expect("booted deployment"); assert!(!booted.is_staged()); - let repo = sysroot.repo().expect("repo"); + let repo = sysroot.repo(); - let csum = booted.csum().expect("booted csum"); + let csum = booted.csum(); let csum = csum.as_str(); let (root, rev) = repo.read_commit(csum, cancellable.as_ref())?;