Skip to content

RepositorySimulator: add trackers/counters for downloaded files #1682

Description

@sechkova

Description of issue or feature request:
There is a need in some test cases to check whether Updater requested the correct files from the repository.
For a concrete use case see #1666.

One option used in #1666 is to use unittest.mock and "wrap" RepositorySimulator._fetch_* methods which does the job but does make the tests less readable.
Therefore as an alternative, proposed by @jku #1666 (review), checking that the expected files are downloaded from remote can be done by adding some download counters into RepositorySimulator which would be cleaner and more maintainable

Activity

  1. added
    backlogIssues to address with priority for current development goals
    on Nov 17, 2021
  2. added this to the Sprint 13 milestone on Nov 24, 2021
  3. kairoaraujo commented on Nov 24, 2021

    @kairoaraujo
    Contributor

    I will work on it.

  4. jku commented on Nov 24, 2021

    @jku
    Member

    basically my idea was that

    • repositorysimulator keeps lists of requests (I guess one for metadata, one for targets makes sense). It adds an item to list every time a request is made
    • tests can at any time check that the list is what they expect
    • tests can also clear the list when they want
    • the format of the lists should be whatever makes most sense for the test code (urls? metadata role names? 🤷)
  5. modified the milestones: Sprint 13, Sprint 14 on Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backlogIssues to address with priority for current development goalstesting

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions