Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2d2c527
Add a regression test for the tutorial instructions
awwad Aug 20, 2018
e2ec3ef
Remove keystore/ use from TUTORIAL.md and test_tutorial
awwad Aug 20, 2018
56f14c4
Remove add_restricted_paths from TUTORIAL.md and test_tutorial.py
awwad Aug 20, 2018
b947a6b
Have test_tutorial.py copy metadata.staged to metadata
awwad Aug 20, 2018
608e377
Exclude leading '/' for target fnames in tutorial and its tester
awwad Aug 20, 2018
e24525c
In repo tutorial, fix consistent snapshots instructions
awwad Aug 20, 2018
3a37189
Use os.path.join instead of '/' in test_tutorial.py for compat
awwad Aug 20, 2018
8e22de5
Correct remove_target() call in TUTORIAL.md and test_tutorial.py
awwad Aug 20, 2018
6c850e0
Test: correctly test use of non-TUF-generated signatures in tutorial
awwad Aug 20, 2018
bfcdfd5
Test: Correctly test target addition in tutorial despite #774
awwad Aug 20, 2018
14500a8
Correct test_tutorial to use '/' in filepaths on all platforms
awwad Aug 21, 2018
b86b4aa
doc: Remove Python prompt tutorial snippet
Nov 20, 2019
eed9003
doc: Add "continuing..." line in tutorial snippets
Nov 20, 2019
5616fd2
doc: Fix repo.status() output in tutorial snippet
Nov 20, 2019
654e8dc
doc: Fix targets file paths in tutorial snippets
Nov 20, 2019
45c4f4c
doc: Update "Dump Metadata and ..." tutorial
Nov 20, 2019
bd813d8
doc: Update delegation-related tutorial sections
Nov 20, 2019
ca8e9cc
doc: Fix repo.dirty_roles() output in tutorial
Nov 20, 2019
bb6a32a
doc: Comment out "Consistent Snapshots" snippet
Nov 20, 2019
512c62d
doc: Update "How to Perform an Update" in tutorial
Nov 20, 2019
e7d3dd4
test: Run tutorial tests in a temporary directory
Nov 20, 2019
647f712
roledb: Make get_dirty_roles() return sorted list
Nov 19, 2019
dc7bb96
test: Add mock test dependency for Py <3.3
Nov 19, 2019
de9851f
test: Adopt tutorial changes in test_tutorial.py
Nov 20, 2019
e6ddac9
test: Update setuptools for appveyor builds
Nov 20, 2019
9375885
docs: Fix typos in tutorial code snippet comments
Nov 29, 2019
5a8dbd4
doc: Update delegation section in tutorial
Nov 30, 2019
fc23496
doc: Update "Delegate to Hashed Bins" in tutorial
Nov 30, 2019
031bd1b
test: Assert tutorial delegate_hashed_bins output
Nov 30, 2019
7e8b7e5
doc: Explicitly mark roles dirty in tutorial
Nov 30, 2019
da26e9a
doc: Revert accidental space deletion in tutorial
Dec 2, 2019
cb8a4c4
test: Install mock in appveyor on Python 2.7
Dec 2, 2019
fc74cf2
test: Misc update in test_tutorial
Dec 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ init:

install:
- set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
- python -m pip install -U pip
- python -m pip install -U pip setuptools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to explicitly install mock for Python 2.7 on appveyor?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. Let me fix this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshuagl, do you happen to know how to install the dependency only for Python 2.7 builds on appveyor?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not off the top of my head, but I think we should be able to use for.matrix.only/.except:
https://www.appveyor.com/docs/build-configuration/#specializing-matrix-job-configuration

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Maybe 932c025 works too.

- pip install -e .
- pip install securesystemslib[crypto,pynacl]
- if %PYTHON_VERSION%==2.7 pip install mock
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does the trick, nice work @lukpueh.


build: false

Expand Down
1 change: 1 addition & 0 deletions ci-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ bandit
# Pin to versions supported by `coveralls` (see .travis.yml)
# https://github.com/coveralls-clients/coveralls-python/releases/tag/1.8.1
coverage<5.0
mock; python_version < "3.3"
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ iso8601==0.1.12
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
mock==3.0.5; python_version < "3.3"
more-itertools==7.2.0 ; python_version >= "3.0" # via zipp
more-itertools==5.0.0 ; python_version < "3.0" # pyup: ignore
packaging==19.2 # via tox
Expand Down
312 changes: 178 additions & 134 deletions docs/TUTORIAL.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
'six>=1.11.0',
'securesystemslib>=0.12.0'
],
tests_require = [
'mock; python_version < "3.3"'
],
packages = find_packages(exclude=['tests']),
scripts = [
'tuf/scripts/repo.py',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_repository_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def test_writeall(self):
self.assertEqual([], tuf.roledb.get_dirty_roles(repository_name))

repository.mark_dirty(['root', 'timestamp'])
self.assertEqual(['root', 'timestamp'], sorted(tuf.roledb.get_dirty_roles(repository_name)))
self.assertEqual(['root', 'timestamp'], tuf.roledb.get_dirty_roles(repository_name))
repository.unmark_dirty(['root'])
self.assertEqual(['timestamp'], tuf.roledb.get_dirty_roles(repository_name))

Expand Down
6 changes: 3 additions & 3 deletions tests/test_roledb.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def test_mark_dirty(self):
self.assertEqual([rolename], tuf.roledb.get_dirty_roles())

tuf.roledb.mark_dirty(['dirty_role'])
self.assertEqual([rolename2, rolename], sorted(tuf.roledb.get_dirty_roles()))
self.assertEqual([rolename2, rolename], tuf.roledb.get_dirty_roles())

# Verify that a role cannot be marked as dirty for a non-existent
# repository.
Expand All @@ -735,9 +735,9 @@ def test_unmark_dirty(self):
tuf.roledb.update_roleinfo(rolename2, roleinfo2, mark_role_as_dirty)

tuf.roledb.unmark_dirty(['dirty_role'])
self.assertEqual([rolename], sorted(tuf.roledb.get_dirty_roles()))
self.assertEqual([rolename], tuf.roledb.get_dirty_roles())
tuf.roledb.unmark_dirty(['targets'])
self.assertEqual([], sorted(tuf.roledb.get_dirty_roles()))
self.assertEqual([], tuf.roledb.get_dirty_roles())

# What happens for a role that isn't dirty? unmark_dirty() should just
# log a message.
Expand Down
Loading