Skip to content
Snippets Groups Projects
Commit 9787c1a7 authored by Georges Racinet's avatar Georges Racinet
Browse files

CommitService.FindCommit: added some test cases

The case of the full node that does not exist goes through
a quite different path in the sub-service layer implementation
(will be moreso true with RHGitaly), it's worth its own test case.
parent 744ee924
No related branches found
No related tags found
2 merge requests!169Protocol v15.9 and stable branch merge",!163FindCommit comparison tests: ensure only GitLab state files are used
Pipeline #67820 passed
......@@ -269,6 +269,9 @@
assert not find_commit(b'f' * 39).HasField('commit')
assert not find_commit(b'f' * 40).HasField('commit')
# non existing valid full node
assert not find_commit(b'dead' * 10).HasField('commit')
# null revision
assert not find_commit(b'0' * 40).HasField('commit')
......
......@@ -227,6 +227,7 @@
assert_compare(revision=b"0000" * 10)
assert_compare(revision=ctx0.hex())
assert_compare(revision=b'dead' * 10) # non resolvable full node
assert_compare(revision=b'branch/default')
assert_compare(revision=b'refs/heads/branch/default')
assert_compare(revision=b'topic/default/sampletop')
......@@ -234,6 +235,7 @@
assert_compare(revision=b'start-tag')
assert_compare(revision=b'refs/tags/start-tag')
assert_compare(revision=b'refs/tags/unknown')
assert_compare(revision=b'HEAD')
assert_compare(revision=mr_ref_path)
hg_ka_ref_path, git_ka_ref_path = fixture.create_keep_around(ctx1.hex())
# assert_compare() not being able to convert the keep-around ref path from
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment