test repo checksum
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
parent
8cbea5731e
commit
8eb4da8724
|
@ -280,8 +280,6 @@ def test_fetch_diferent_tags(cloned_base_repo_obj: RepoTool, path_repo_different
|
|||
|
||||
assert cloned_base_repo_obj.fetch()
|
||||
|
||||
print(branches)
|
||||
|
||||
branches = prepare_collection_list(cloned_base_repo_obj._repo.branches)
|
||||
assert branches == [
|
||||
('br0', '1fe320fe278a40bfd6813860d9952b03caf5e2ea'),
|
||||
|
@ -401,3 +399,23 @@ def test_fetch_reduced(cloned_base_repo_obj: RepoTool, path_repo_reduced: Path):
|
|||
('wip-003', 'd3e906333be8a6ff09f96e827199d51694a16dc1'),
|
||||
('wip-r/1', '030cc2b97d8ecbf07b7bd361105f07e631393f00')
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("repo,hash", [
|
||||
("test-repo-base", "d5803947514ee6d7834157421171a94174a516dc9606de6aa52e28e71cea2c0e"),
|
||||
("test-repo-different-tags", "30a8507cb85c5fe7d07c1ef9a95eeed55fedd5c874f4fe723c2f9f56b0a96856"),
|
||||
("test-repo-changed-branches", "a987fd182cb173f6913eaeb774aa710c26112dc9f5ea8cd10c75efa614768444"),
|
||||
("test-repo-new-commits", "1a67df432e2206089ec019e272d91051b7ead0334dd03955352656e29e603813"),
|
||||
("test-repo-reduced", "fb7fd812ec30265ecc3014824e467746112403dab114cf37907facb10a85a3e2"),
|
||||
("nonexistent-repo.git", False),
|
||||
|
||||
])
|
||||
def test_fingerprint(support_data_path: Path, repo: str, hash):
|
||||
path = support_data_path.joinpath(repo).as_posix()
|
||||
rt = RepoTool(path)
|
||||
if hash:
|
||||
assert rt.initialized
|
||||
else:
|
||||
assert not rt.initialized
|
||||
|
||||
assert rt.repo_fingerprint() == hash
|
||||
|
|
Loading…
Reference in New Issue
Block a user