Skip to content

Commit

Permalink
Fix failing unit tests
Browse files Browse the repository at this point in the history
Corresponding to the securesyslib changes made in this pr:
secure-systems-lab/securesystemslib#244
which changed the securesyslib.formats.PATH schema to be of type
AnyNonemptystring.
This made the tuf unit tests to fail because there are to places
where functional arguments should comply with the
securesyslib.formats.PATH schema, but have a default value of
an empty string.

Signed-off-by: Martin Vrachev <[email protected]>
  • Loading branch information
MVrachev committed Jun 30, 2020
1 parent 5d16f91 commit 853cdd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tuf/developer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def create_new_project(project_name, metadata_directory,
# Do the same for the location in the repo and the project name, we must
# ensure they are valid pathnames.
securesystemslib.formats.NAME_SCHEMA.check_match(project_name)
securesystemslib.formats.PATH_SCHEMA.check_match(location_in_repository)
securesystemslib.formats.ANY_STRING_SCHEMA.check_match(location_in_repository)
securesystemslib.formats.NAME_SCHEMA.check_match(repository_name)

# for the targets directory we do the same, but first, let's find out what
Expand Down Expand Up @@ -797,7 +797,7 @@ def load_project(project_directory, prefix='', new_targets_location=None,
securesystemslib.formats.NAME_SCHEMA.check_match(repository_name)

# Do the same for the prefix
securesystemslib.formats.PATH_SCHEMA.check_match(prefix)
securesystemslib.formats.ANY_STRING_SCHEMA.check_match(prefix)

# Clear the role and key databases since we are loading in a new project.
tuf.roledb.clear_roledb(clear_all=True)
Expand Down

0 comments on commit 853cdd3

Please sign in to comment.