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/cli/gitalybackup/restore_test.go')
-rw-r--r--internal/cli/gitalybackup/restore_test.go20
1 files changed, 18 insertions, 2 deletions
diff --git a/internal/cli/gitalybackup/restore_test.go b/internal/cli/gitalybackup/restore_test.go
index 6d235525c..4eae52e4c 100644
--- a/internal/cli/gitalybackup/restore_test.go
+++ b/internal/cli/gitalybackup/restore_test.go
@@ -75,6 +75,12 @@ Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/5269`)
}))
}
+ require.NoError(t, encoder.Encode(map[string]string{
+ "address": "invalid",
+ "token": "invalid",
+ "relative_path": "invalid",
+ }))
+
ctx = testhelper.MergeIncomingMetadata(ctx, testcfg.GitalyServersMetadataFromCfg(t, cfg))
args := []string{
@@ -97,7 +103,9 @@ Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/5269`)
require.DirExists(t, existRepoPath)
- require.NoError(t, cmd.RunContext(ctx, args))
+ require.EqualError(t,
+ cmd.RunContext(ctx, args),
+ "restore: pipeline: 1 failures encountered:\n - invalid: manager: could not dial source: invalid connection string: \"invalid\"\n")
require.NoDirExists(t, existRepoPath)
@@ -171,6 +179,12 @@ Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/5269`)
}))
}
+ require.NoError(t, encoder.Encode(map[string]string{
+ "address": "invalid",
+ "token": "invalid",
+ "relative_path": "invalid",
+ }))
+
ctx = testhelper.MergeIncomingMetadata(ctx, testcfg.GitalyServersMetadataFromCfg(t, cfg))
args := []string{
@@ -193,7 +207,9 @@ Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/5269`)
require.DirExists(t, existRepoPath)
- require.NoError(t, cmd.RunContext(ctx, args))
+ require.EqualError(t,
+ cmd.RunContext(ctx, args),
+ "restore: pipeline: 1 failures encountered:\n - invalid: server-side restore: could not dial source: invalid connection string: \"invalid\"\n")
require.NoDirExists(t, existRepoPath)