mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-09 01:18:35 +03:00
14 lines
426 B
Rust
14 lines
426 B
Rust
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(())
|
|
}
|