mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
I created a new script called "generate_md.py" which can be used to easily generate a repository. Additionally, I created a new test file making sure that the locally stored metadata files and the newly generated metadata roles are the same. This will allow us to test that we are not changing the metadata file structure when making changes. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
26 lines
687 B
Python
26 lines
687 B
Python
"""Unit tests for 'tests/generated_data/generate_md.py'."""
|
|
|
|
# Copyright New York University and the TUF contributors
|
|
# SPDX-License-Identifier: MIT OR Apache-2.0
|
|
|
|
|
|
import sys
|
|
import unittest
|
|
|
|
from tests import utils
|
|
from tests.generated_data.generate_md import generate_all_files
|
|
|
|
|
|
class TestMetadataGeneration(unittest.TestCase):
|
|
"""Test metadata files generation."""
|
|
|
|
@staticmethod
|
|
def test_compare_static_md_to_generated() -> None:
|
|
# md_generator = MetadataGenerator("generated_data/ed25519_metadata")
|
|
generate_all_files(dump=False, verify=True)
|
|
|
|
|
|
# Run unit test.
|
|
if __name__ == "__main__":
|
|
utils.configure_test_logging(sys.argv)
|
|
unittest.main()
|