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

test CommitService.LastCommitForPath: case with obsolescence

explicitely asserting obsolescence of the changeset, because
it is a bit less obvious in this case why it works.
parent 86b6cde7
No related branches found
No related tags found
2 merge requests!98Merged stable branch into default,!94CommitService: missing resolutions of obsolete changesets
......@@ -537,9 +537,10 @@
assert do_rpc(revision=b'branch/default', path=b'foo') == ctx1.hex()
assert do_rpc(revision=b'branch/other', path=b'foo') == ctx.hex()
assert do_rpc(revision=ctx2.hex(), path=b'foo') == ctx.hex()
assert not do_rpc(revision=b'branch/default', path=b'sub/bar')
assert do_rpc(revision=b'branch/other', path=b'sub/bar') == ctx2.hex()
# recursive directory matching (see Rails tests for validation
# that we must match on directories)
assert do_rpc(revision=b'branch/other', path=b'sub') == ctx2.hex()
......@@ -540,9 +541,14 @@
assert not do_rpc(revision=b'branch/default', path=b'sub/bar')
assert do_rpc(revision=b'branch/other', path=b'sub/bar') == ctx2.hex()
# recursive directory matching (see Rails tests for validation
# that we must match on directories)
assert do_rpc(revision=b'branch/other', path=b'sub') == ctx2.hex()
# with obsolescence
wrapper.command('amend', message=b'amended')
assert ctx2.obsolete()
assert do_rpc(revision=ctx2.hex(), path=b'foo') == ctx.hex()
def test_list_commits_by_oid(grpc_channel, server_repos_root):
grpc_stub = CommitServiceStub(grpc_channel)
......
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