tests: do not pass in commit objects loaded from different store

Otherwise the assertion would fail in the next patch.
This commit is contained in:
Yuya Nishihara 2024-08-08 18:52:51 +09:00
parent 8b72dad095
commit 37c41d0eaf

View file

@ -371,6 +371,11 @@ fn test_acl() {
&default_working_copy_factories(), &default_working_copy_factories(),
) )
.unwrap(); .unwrap();
// Reload commits from the store associated with the workspace
let repo = ws.repo_loader().load_at(repo.operation()).unwrap();
let commit1 = repo.store().get_commit(commit1.id()).unwrap();
let commit2 = repo.store().get_commit(commit2.id()).unwrap();
ws.check_out(repo.op_id().clone(), None, &commit1).unwrap(); ws.check_out(repo.op_id().clone(), None, &commit1).unwrap();
assert!(!secret_modified_path.to_fs_path(&workspace_root).is_file()); assert!(!secret_modified_path.to_fs_path(&workspace_root).is_file());
assert!(!secret_added_path.to_fs_path(&workspace_root).is_file()); assert!(!secret_added_path.to_fs_path(&workspace_root).is_file());