diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-06-28 08:20:02 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-06-28 08:39:04 +0300 |
commit | b0282ebd240c5a9d34e496bd7de35ca1eecf3ef4 (patch) | |
tree | e3613bb3ec86e01871d506b770b76a32bdc95eb6 /internal/gitaly/service/operations/submodules_test.go | |
parent | b1919c1ec2ef38c62ee6563e4eb6c0a93e8eddb7 (diff) |
praefect/coordinator: Unify ErrRepositoryNotSet errors with Gitaly
The coordinator prefixes most of its errors with "repo scoped", which
makes the errors mismatch those returned by Gitaly. Consequentially,
Praefect does not act as an actually-transparent proxy. This can be
painfully felt in our tests, where we need to distinguish between both
errors.
Drop the prefix and return the error directly to unify the errors that
both Gitaly and Praefect would return.
Diffstat (limited to 'internal/gitaly/service/operations/submodules_test.go')
-rw-r--r-- | internal/gitaly/service/operations/submodules_test.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/internal/gitaly/service/operations/submodules_test.go b/internal/gitaly/service/operations/submodules_test.go index 7cad7be53..46053393c 100644 --- a/internal/gitaly/service/operations/submodules_test.go +++ b/internal/gitaly/service/operations/submodules_test.go @@ -261,11 +261,8 @@ func testUserUpdateSubmodule(t *testing.T, ctx context.Context) { Submodule: []byte("sub"), CommitMessage: []byte("Updating Submodule: sub"), }, - expectedErr: testhelper.GitalyOrPraefect( - structerr.NewInvalidArgument("%w", storage.ErrRepositoryNotSet), - structerr.NewInvalidArgument("repo scoped: %w", storage.ErrRepositoryNotSet), - ), - verify: func(t *testing.T) {}, + expectedErr: structerr.NewInvalidArgument("%w", storage.ErrRepositoryNotSet), + verify: func(t *testing.T) {}, } }, }, |