From 37c41d0eaf4d6619080bf7f4abeb60913f8d53a8 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Thu, 8 Aug 2024 18:52:51 +0900 Subject: [PATCH] tests: do not pass in commit objects loaded from different store Otherwise the assertion would fail in the next patch. --- lib/tests/test_local_working_copy.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tests/test_local_working_copy.rs b/lib/tests/test_local_working_copy.rs index c09b32838..771d9b0f5 100644 --- a/lib/tests/test_local_working_copy.rs +++ b/lib/tests/test_local_working_copy.rs @@ -371,6 +371,11 @@ fn test_acl() { &default_working_copy_factories(), ) .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(); assert!(!secret_modified_path.to_fs_path(&workspace_root).is_file()); assert!(!secret_added_path.to_fs_path(&workspace_root).is_file());