ostree 0.20.5

Rust bindings for libostree
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::util::*;
use std::error::Error;

#[test]
fn variant_types() -> Result<(), Box<dyn Error>> {
    let tr = TestRepo::new();
    let commit_checksum = tr.test_commit("test");
    let repo = &tr.repo;
    let commit_v = repo.load_variant(ostree::ObjectType::Commit, commit_checksum.as_str())?;
    let commit = commit_v.get::<ostree::CommitVariantType>().unwrap();
    assert_eq!(commit.3, "Test Commit");
    Ok(())
}