tests: Fix test_load_metadata_from_cache for versioned roots

Expect (failing) call to open for "root_history/2.root.json" now that
the client stores versioned roots.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
This commit is contained in:
Jussi Kukkonen 2024-12-31 12:52:28 +02:00
parent cea1745cef
commit 4aa09ff7d5

View file

@ -732,6 +732,7 @@ def test_load_metadata_from_cache(self, wrapped_open: MagicMock) -> None:
wrapped_open.assert_has_calls(
[
call(os.path.join(self.metadata_dir, "root.json"), "rb"),
call(os.path.join(self.metadata_dir, "root_history/2.root.json"), "rb"),
call(os.path.join(self.metadata_dir, "timestamp.json"), "rb"),
call(os.path.join(self.metadata_dir, "snapshot.json"), "rb"),
call(os.path.join(self.metadata_dir, "targets.json"), "rb"),