theupdateframework / theupdateframework/python-tuf

ngtests: improve _assert* methods

Open
#1,669 0 comments 0 reactions 1 assignee View on GitHub

@MVrachev is already working on this.

Since Feb 23, 2022.

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

Description

Description of issue or feature request:

Currently #1636 proposes three types of asserts for checking the state of local metadata:

  • _assert_files_exist
  • _assert_content_equals
  • _assert_version_equals

These still have some issues (see https://github.com/theupdateframework/python-tuf/pull/1636#discussion_r74079588, https://github.com/theupdateframework/python-tuf/pull/1636#pullrequestreview-794981714)

  • non-trivial to pick which assert to use in which test case
  • _assert_content_equals calls the private method Repositorysimulator._fetch_metadata() to get the metadata content in bytes.

A smarter approach is needed, be it integrated in Repositorysimulator or not.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.