Skip to content

Add unit tests for Gitaly types

Zeger-Jan van de Weg requested to merge zj-unit-test-gitaly-arrays into master

On a repeated field the type is Google::Protobuf::RepeatedField. However, an Array is preferable as the interface is predictable and its expected at least not to be a Google::Protobuf type either way in the main app, that is, not in lib/gitlab/git. All this would've been prevented when not using a repeated field but just streaming the commits back, and in my opinion this is the way it should be refactored after the Gitaly v1.0 release when designing the interface for 2.0.


Note to release managers: also pick https://gitlab.com/gitlab-org/gitlab-ce/commit/23dd313d76f2254a7a5c58283cb76236a160647b when picking into 10-5-stable, otherwise tests will fail.

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Tests added for this feature/bug
  • Review
    • Has been reviewed by Backend

What are the relevant issue numbers?

!17035 (merged) didn't add any unit tests.

Also https://gitlab.com/gitlab-org/gitlab-ce/issues/32564

Needed for gitaly#1028 (closed)

Edited by Jacob Vosmaer

Merge request reports