Skip to content

Commit

Permalink
Cleanup test_basic_init_and_refresh
Browse files Browse the repository at this point in the history
Signed-off-by: Jussi Kukkonen <[email protected]>
  • Loading branch information
jku committed Jul 30, 2024
1 parent f3fd39d commit 880b344
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tuf_conformance/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,22 @@ def test_basic_init_and_refresh(
init_data, repo = server.new_test(client.test_name)

# Run the test: step 1: initialize client
# TODO verify success?
assert client.init_client(init_data) == 0

# TODO verify that results are correct, see e.g.
# * repo.metadata_statistics: no requests expected
# * client metadat cache should contain root v1

# Run the test: step 1: Refresh
# Run the test: step 2: Refresh
assert client.refresh(init_data) == 0

# Verify that expected requests were made
assert repo.metadata_statistics == [('root', 2),
('timestamp', None),
('snapshot', 1),
('targets', 1)]
# TODO verify that local metadata cache has the files we expect

#verify client metadata looks as expected
assert client.version(Root.type) == 1
assert client.version(Timestamp.type) == 1
assert client.version(Snapshot.type) == 1
assert client.version(Targets.type) == 1

def test_timestamp_eq_versions_check(
client: ClientRunner, server: SimulatorServer
Expand Down

0 comments on commit 880b344

Please sign in to comment.