Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/service/remote/fetch_internal_remote_test.go')
-rw-r--r--internal/service/remote/fetch_internal_remote_test.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/internal/service/remote/fetch_internal_remote_test.go b/internal/service/remote/fetch_internal_remote_test.go
index e752bffb3..e5236b253 100644
--- a/internal/service/remote/fetch_internal_remote_test.go
+++ b/internal/service/remote/fetch_internal_remote_test.go
@@ -77,6 +77,34 @@ func TestFailedFetchInternalRemote(t *testing.T) {
require.False(t, c.GetResult())
}
+func TestFailedFetchInternalRemoteOnError(t *testing.T) {
+ server, serverSocketPath := runFullServer(t)
+ defer server.Stop()
+
+ client, conn := remote.NewRemoteClient(t, serverSocketPath)
+ defer conn.Close()
+
+ repo, _, cleanupFn := testhelper.InitBareRepo(t)
+ defer cleanupFn()
+
+ ctxOuter, cancel := testhelper.Context()
+ defer cancel()
+
+ md := testhelper.GitalyServersMetadata(t, serverSocketPath)
+ ctx := metadata.NewOutgoingContext(ctxOuter, md)
+
+ // Non-existing remote repo
+ remoteRepo := &gitalypb.Repository{StorageName: "default", RelativePath: "fake.git"}
+
+ request := &gitalypb.FetchInternalRemoteRequest{
+ Repository: repo,
+ RemoteRepository: remoteRepo,
+ }
+
+ _, err := client.FetchInternalRemoteErrorOnFailure(ctx, request)
+ require.Error(t, err)
+}
+
func TestFailedFetchInternalRemoteDueToValidations(t *testing.T) {
server, serverSocketPath := runFullServer(t)
defer server.Stop()