theupdateframework / theupdateframework/python-tuf

repository module: Add tests

Open
#2,228 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.7k
Forks
304
Avg merge
1d 2h
Merged PRs (30d)
17

Description

Once #2193 is merged, there is a repository module. The module is not really tested but should be.

It's entirely possible that the module can't really be effectively unit tested (as it's an ABC). But the repository example can be end-to-end tested and maybe even the SimpleRepository class within the example could be unit tested. I think testing the whole repository example is most critical.

I'm not sure what kind of things we should test but at least

  • refreshing a client, downloading a file from the repository
  • making sure the repository metadata actually changes, and that the updated metadata is correct (i.e. client that has metadata version N can successfully update to N+M)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the repository module and its repository example, including the SimpleRepository class, then inspect the existing test structure. Add coverage for refreshing a client, downloading a file, and updating repository metadata from version N to N+M, with the updated metadata verified as correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.