python-tuf/tests/repository_data
Lukas Puehringer 250a3f32a6 Add two ed25519 key pairs for updater tests
This commit also updates the key loader helper in
test_updater_root_rotation_integration.py to load
the new keys too.

The keys were created (at the root of the repository) like
so:

```
from tuf import repository_tool
repository_tool.generate_and_write_ed25519_keypair(
    "tests/repository_data/keystore/root_key2", "password")
repository_tool.generate_and_write_ed25519_keypair(
    "tests/repository_data/keystore/root_key3", "password")

```

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-10-07 11:59:40 +02:00
..
client Re-generate repository and client test metadata 2019-09-16 15:43:39 +02:00
keystore Add two ed25519 key pairs for updater tests 2019-10-07 11:59:40 +02:00
project Re-generate projects test metadata 2019-09-16 15:43:39 +02:00
repository Re-generate repository and client test metadata 2019-09-16 15:43:39 +02:00
generate.py Remove obsolete 'interposition' from docs 2019-09-24 14:31:54 +02:00
generate_project_data.py Edit test repo scripts to exclude target files with leading os.sep 2018-04-06 11:08:45 -04:00
map.json Tweak map file to improve test coverage 2017-12-08 16:32:49 -05:00
README.md fix-up the the -> the 2019-09-01 22:53:02 +08:00

Unit and integration testing

Running the tests

The unit and integration tests can be executed by invoking tox from any path under the project directory.

$ tox

Or by invoking aggregate_tests.py from the tests directory.

$ python aggregate_tests.py

Note: integration tests end in _integration.py.

If you wish to run a particular unit test, navigate to the tests directory and run that specific unit test. For example:

$ python test_updater.py

It it also possible to run the test cases of a unit test. For instance:

$ python -m unittest test_updater.TestMultiRepoUpdater.test_get_one_valid_targetinfo

Setup

The unit and integration tests operate on static metadata available in the repository_data directory. Before running the tests, static metadata is first copied to temporary directories and modified, as needed, by the tests.

The test modules typically spawn HTTP(S) servers that serve metadata and target files for the unit tests. The map file specifies the location of the test repositories and other properties. For specific targets and metadata provided by the tests repositories, please inspect their respective metadata.