Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the way specification version is checked in metadata #842

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

awwad
Copy link
Contributor

@awwad awwad commented Mar 28, 2019

Improve the way specification version is checked in metadata
and generate more friendly errors. Prior to this, a test in
test_updater.py was written in such a way to not actually be
testing whether or not specification version checking was
working correctly -- the error updater.py raised if a specification
version number was not supported was the same as would be raised
if a role version was not the expected version, and, amusingly,
the test could not distinguish between these two scenarios and
was providing the wrong role version......

Specification version mismatch now raises a particular error:
UnsupportedSpecificationError.

The specification version supported by this code is now also all
in one place, tuf.formats rather than tuf.updater.

Related error messages and testing were improved (with some
edge cases closed).

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

and generate more friendly errors.  Prior to this, a test in
test_updater.py was written in such a way to not actually be
testing whether or not specification version checking was
working correctly -- the error updater.py raised if a specification
version number was not supported was the same as would be raised
if a role version was not the expected version, and, amusingly,
the test could not distinguish between these two scenarios and
was providing the wrong role version......

Specification version mismatch now raises a particular error:
UnsupportedSpecificationError.

The specification version supported by this code is now also all
in one place, tuf.formats rather than tuf.updater.

Related error messages and testing were improved (with some
edge cases closed).

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
@awwad awwad merged commit 2d2e401 into develop Mar 28, 2019
@awwad awwad deleted the improve_spec_version_handling branch April 1, 2019 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant