Commit graph

6 commits

Author SHA1 Message Date
Lukas Puehringer
d8b23f1d55 test: add missing return type hint in test method
Following parallel merges of #1700 (added new test method),
and #1710 (started running mypy on tests), ci/cd fails in the
develop branch. This is fixed in this patch.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-12-10 10:48:36 +01:00
lukpueh
8209189a44
Merge pull request #1700 from lukpueh/repo-examples-hbd
doc:  basic hash bin delegation repo example + test
2021-12-10 10:33:04 +01:00
Martin Vrachev
d5d0b94f62 Add logging configuration in tests/test_examples
Logging configuration is part from each test file begging from commit
03b15fb4be
We should that as well for tests/test_examples.py

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-12-09 16:44:25 +02:00
Martin Vrachev
5aa547d6b6 Address more mypy warnings on tests files
All of the changes are made manual.
The target files are only those who test the new code.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-12-09 16:44:24 +02:00
Lukas Puehringer
e90acfe123 doc: basic hash bin delegation repo example + test
As 'repository_tool' and 'repository_lib' are being deprecated,
hash bin delegation interfaces are no longer available in this
implementation. The example code in this file demonstrates how to
easily implement those interfaces, and how to use them together
with the TUF metadata API, to perform hash bin delegation.

Note, the hash bin delegation logic in this example is largely
copied from repository_{lib, tool}, and modernized and simplified
for this purpose.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-12-03 10:33:24 +01:00
Lukas Puehringer
a1531d8c50 test: add test module for basic repo example
Adds new test module that executes the basic repo example
Python script and checks that it created certain (metadata)
files.

The test module is tailored for testing similar example scripts.

Co-authored-by: Joshua Lock <jlock@vmware.com>
Co-authored-by: Jussi Kukkonen <jku@goto.fi>

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2021-11-29 13:25:26 +01:00