mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
Merge pull request #3000 from cgwalters/test-inst-update
tests/inst: Update to latest ostree-ext
This commit is contained in:
commit
e3ef72ea8a
@ -20,7 +20,7 @@ serde_json = "1.0"
|
|||||||
sh-inline = "0.4.0"
|
sh-inline = "0.4.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
tempfile = "3.1.0"
|
tempfile = "3.1.0"
|
||||||
ostree-ext = { version = "0.9" }
|
ostree-ext = { version = "0.11" }
|
||||||
libtest-mimic = "0.5.0"
|
libtest-mimic = "0.5.0"
|
||||||
twoway = "0.2.1"
|
twoway = "0.2.1"
|
||||||
hyper = { version = "0.14", features = ["runtime", "http1", "http2", "tcp", "server"] }
|
hyper = { version = "0.14", features = ["runtime", "http1", "http2", "tcp", "server"] }
|
||||||
|
@ -287,7 +287,7 @@ fn parse_and_validate_reboot_mark<M: AsRef<str>>(
|
|||||||
generate_update(&firstdeploy.checksum)?;
|
generate_update(&firstdeploy.checksum)?;
|
||||||
// Update the target state
|
// Update the target state
|
||||||
let srvrepo_obj = ostree::Repo::new(&gio::File::for_path(SRVREPO));
|
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();
|
commitstates.target = srvrepo_obj.resolve_rev(TESTREF, false)?.unwrap().into();
|
||||||
} else if commitstates.booted == commitstates.orig || commitstates.booted == commitstates.prev {
|
} else if commitstates.booted == commitstates.orig || commitstates.booted == commitstates.prev {
|
||||||
println!(
|
println!(
|
||||||
@ -357,9 +357,9 @@ fn impl_transaction_test<M: AsRef<str>>(
|
|||||||
// Gather the expected possible commits
|
// Gather the expected possible commits
|
||||||
let mut commitstates = {
|
let mut commitstates = {
|
||||||
let srvrepo_obj = ostree::Repo::new(&gio::File::for_path(SRVREPO));
|
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"));
|
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 {
|
CommitStates {
|
||||||
booted: booted_commit.to_string(),
|
booted: booted_commit.to_string(),
|
||||||
@ -569,7 +569,7 @@ pub(crate) fn itest_transactionality() -> Result<()> {
|
|||||||
sysroot.load(cancellable.as_ref())?;
|
sysroot.load(cancellable.as_ref())?;
|
||||||
assert!(sysroot.is_booted());
|
assert!(sysroot.is_booted());
|
||||||
let booted = sysroot.booted_deployment().expect("booted deployment");
|
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
|
// We need this static across reboots
|
||||||
let srvrepo = Path::new(SRVREPO);
|
let srvrepo = Path::new(SRVREPO);
|
||||||
let firstrun = !srvrepo.exists();
|
let firstrun = !srvrepo.exists();
|
||||||
|
@ -26,9 +26,9 @@ pub(crate) fn itest_sysroot_ro() -> Result<()> {
|
|||||||
|
|
||||||
let booted = sysroot.booted_deployment().expect("booted deployment");
|
let booted = sysroot.booted_deployment().expect("booted deployment");
|
||||||
assert!(!booted.is_staged());
|
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 csum = csum.as_str();
|
||||||
|
|
||||||
let (root, rev) = repo.read_commit(csum, cancellable.as_ref())?;
|
let (root, rev) = repo.read_commit(csum, cancellable.as_ref())?;
|
||||||
|
Loading…
Reference in New Issue
Block a user