diff options
Diffstat (limited to 'internal/bundleuri/git_config_test.go')
-rw-r--r-- | internal/bundleuri/git_config_test.go | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/internal/bundleuri/git_config_test.go b/internal/bundleuri/git_config_test.go index c14c3625b..57427fe41 100644 --- a/internal/bundleuri/git_config_test.go +++ b/internal/bundleuri/git_config_test.go @@ -40,18 +40,36 @@ func testUploadPackGitConfig(t *testing.T, ctx context.Context) { }{ { desc: "no backup locator nor sink", + expectedConfig: []git.ConfigPair{ + { + Key: "uploadpack.advertiseBundleURIs", + Value: "true", + }, + }, }, { desc: "no backup locator", signedURLFunc: func(context.Context, string, time.Duration) (string, error) { return "", structerr.NewNotFound("not signed") }, + expectedConfig: []git.ConfigPair{ + { + Key: "uploadpack.advertiseBundleURIs", + Value: "true", + }, + }, }, { desc: "no backup sink", findLatestFunc: func(context.Context, storage.Repository) (*backup.Backup, error) { return nil, structerr.NewNotFound("no backup found") }, + expectedConfig: []git.ConfigPair{ + { + Key: "uploadpack.advertiseBundleURIs", + Value: "true", + }, + }, }, { desc: "no backup found", @@ -61,6 +79,12 @@ func testUploadPackGitConfig(t *testing.T, ctx context.Context) { signedURLFunc: func(context.Context, string, time.Duration) (string, error) { return "", structerr.NewNotFound("not signed") }, + expectedConfig: []git.ConfigPair{ + { + Key: "uploadpack.advertiseBundleURIs", + Value: "true", + }, + }, }, { desc: "backup has no steps", @@ -70,6 +94,12 @@ func testUploadPackGitConfig(t *testing.T, ctx context.Context) { signedURLFunc: func(context.Context, string, time.Duration) (string, error) { return "", structerr.NewNotFound("not signed") }, + expectedConfig: []git.ConfigPair{ + { + Key: "uploadpack.advertiseBundleURIs", + Value: "true", + }, + }, }, { desc: "backup step is incremental", @@ -81,6 +111,12 @@ func testUploadPackGitConfig(t *testing.T, ctx context.Context) { signedURLFunc: func(context.Context, string, time.Duration) (string, error) { return "", structerr.NewNotFound("not signed") }, + expectedConfig: []git.ConfigPair{ + { + Key: "uploadpack.advertiseBundleURIs", + Value: "true", + }, + }, }, { desc: "sign failed", @@ -92,6 +128,12 @@ func testUploadPackGitConfig(t *testing.T, ctx context.Context) { signedURLFunc: func(context.Context, string, time.Duration) (string, error) { return "", structerr.NewNotFound("not signed") }, + expectedConfig: []git.ConfigPair{ + { + Key: "uploadpack.advertiseBundleURIs", + Value: "true", + }, + }, }, { desc: "success", |