diff options
author | Toon Claes <toon@gitlab.com> | 2021-11-22 13:01:30 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2021-11-22 13:01:30 +0300 |
commit | 78f38ee2cc35e02c4cb0c42def3e3378970e7afb (patch) | |
tree | 91c1b47b15a61ace534a822af37f573413ab597b /cmd | |
parent | 6715e04b0a20714776227eaa67d68a6fa1ccfbdf (diff) | |
parent | bf2a1d91eab5d2dbd8787dc55e5642c2efa9489d (diff) |
Merge branch 'error_summary' into 'master'
Collect summary of backup errors
See merge request gitlab-org/gitaly!4049
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gitaly-backup/create_test.go | 7 | ||||
-rw-r--r-- | cmd/gitaly-backup/restore_test.go | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/cmd/gitaly-backup/create_test.go b/cmd/gitaly-backup/create_test.go index bb58c435f..957005e0b 100644 --- a/cmd/gitaly-backup/create_test.go +++ b/cmd/gitaly-backup/create_test.go @@ -48,8 +48,9 @@ func TestCreateSubcommand(t *testing.T) { } require.NoError(t, encoder.Encode(map[string]string{ - "address": "invalid", - "token": "invalid", + "address": "invalid", + "token": "invalid", + "relative_path": "invalid", })) cmd := createSubcommand{backupPath: path} @@ -60,7 +61,7 @@ func TestCreateSubcommand(t *testing.T) { require.NoError(t, fs.Parse([]string{"-path", path})) require.EqualError(t, cmd.Run(context.Background(), &stdin, io.Discard), - "create: pipeline: 1 failures encountered") + "create: pipeline: 1 failures encountered:\n - invalid: manager: isEmpty: could not dial source: invalid connection string: \"invalid\"\n") for _, repo := range repos { bundlePath := filepath.Join(path, repo.RelativePath+".bundle") diff --git a/cmd/gitaly-backup/restore_test.go b/cmd/gitaly-backup/restore_test.go index 083885e42..0b309db30 100644 --- a/cmd/gitaly-backup/restore_test.go +++ b/cmd/gitaly-backup/restore_test.go @@ -55,8 +55,9 @@ func TestRestoreSubcommand(t *testing.T) { } require.NoError(t, encoder.Encode(map[string]string{ - "address": "invalid", - "token": "invalid", + "address": "invalid", + "token": "invalid", + "relative_path": "invalid", })) cmd := restoreSubcommand{} @@ -67,7 +68,7 @@ func TestRestoreSubcommand(t *testing.T) { require.NoError(t, fs.Parse([]string{"-path", path})) require.EqualError(t, cmd.Run(context.Background(), &stdin, io.Discard), - "restore: pipeline: 1 failures encountered") + "restore: pipeline: 1 failures encountered:\n - invalid: manager: remove repository: could not dial source: invalid connection string: \"invalid\"\n") for _, repo := range repos { repoPath := filepath.Join(cfg.Storages[0].Path, repo.RelativePath) |