Skip to content

Commit

Permalink
Tests: assert that test_targets use hash prefixes
Browse files Browse the repository at this point in the history
Make sure that hash prefixes are added when downloading a target
through the repository simulator.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
  • Loading branch information
MVrachev committed Oct 6, 2021
1 parent 53a24da commit b51c099
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_updater_with_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def test_targets(self, test_case_data: TargetData):
[file_info]
)

# Assert consistent_snapshot is True and downloaded targets have prefix.
self.assertTrue(self.sim.root.consistent_snapshot)
self.assertTrue(updater.config.prefix_targets_with_hash)
# download target, assert it is in cache and content is correct
local_path = updater.download_target(file_info, self.targets_dir)
self.assertEqual(
Expand Down

0 comments on commit b51c099

Please sign in to comment.