lib: RepoCheckoutAtOptions

This commit is contained in:
Felix Krull authored and Colin Walters committed 2022-05-06 12:53:54 -04:00
1 parent 16718eb155
commit eec4a2287d
7 files changed
+254 -13

No files matched your search

+9
View File
@@ -64,3 +64,12 @@ pub fn commit(repo: &ostree::Repo, mtree: &ostree::MutableTree, ref_: &str) -> G
.expect("commit transaction");
checksum
}
pub fn assert_test_file(checkout: &Path) {
let testfile_path = checkout
.join("test-checkout")
.join("testdir")
.join("testfile");
let testfile_contents = std::fs::read_to_string(testfile_path).expect("test file");
assert_eq!("test\n", testfile_contents);
}