forked from theupdateframework/python-tuf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented call_stats to RepositorySimulator
This change is to implement a feature to track the fetch calls to the metadata and targets. This feature was mentioned in PR theupdateframework#1666 that generated issue theupdateframework#1682. It is the ``RepositorySimulator.fetch_tracker``. It also changes the ``test_updater_consistent_snapshot`` to use the fetch_tracker instead of mocking it. It implements a ``dataclass`` that stores the calls to fetch metadata (``_fetch_metadata``) and targets (``_fetch_targets``). This dataclass has a method to clean (``clear``) the current metadata and targets tracker. The fetch calls for metadata are stored as a list of tuples that contains metadata role name and version, and fetch calls for targets are stored as a list of target paths. Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
- Loading branch information
Kairo de Araujo
committed
Dec 1, 2021
1 parent
600eb86
commit e1d9502
Showing
2 changed files
with
60 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters