From 062e67191f5854fb8f7b8ef0082e61b022af5580 Mon Sep 17 00:00:00 2001 From: Saquib Mian Date: Fri, 10 Nov 2023 17:39:57 -0500 Subject: [PATCH] fix --- private/buf/bufsync/backfill_tags_test.go | 2 +- private/buf/bufsync/commits_to_sync_test.go | 7 ++----- private/buf/bufsync/prepare_sync_test.go | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/private/buf/bufsync/backfill_tags_test.go b/private/buf/bufsync/backfill_tags_test.go index f1a28f3901..4163861823 100644 --- a/private/buf/bufsync/backfill_tags_test.go +++ b/private/buf/bufsync/backfill_tags_test.go @@ -33,7 +33,7 @@ import ( func TestBackfilltags(t *testing.T) { t.Parallel() const defaultBranchName = "main" - repo := gittest.ScaffoldGitRepository(t, gittest.ScaffoldGitRepositoryWithOnlyInitialCommit()) + repo := gittest.ScaffoldGitRepository(t) moduleIdentityInHEAD, err := bufmoduleref.NewModuleIdentity("buf.build", "acme", "foo") require.NoError(t, err) prepareGitRepoBackfillTags(t, repo, moduleIdentityInHEAD) diff --git a/private/buf/bufsync/commits_to_sync_test.go b/private/buf/bufsync/commits_to_sync_test.go index b28a010c25..af212df051 100644 --- a/private/buf/bufsync/commits_to_sync_test.go +++ b/private/buf/bufsync/commits_to_sync_test.go @@ -21,7 +21,6 @@ import ( "github.com/bufbuild/buf/private/buf/bufsync" "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref" - "github.com/bufbuild/buf/private/pkg/command" "github.com/bufbuild/buf/private/pkg/git/gittest" "github.com/bufbuild/buf/private/pkg/storage/storagegit" "github.com/stretchr/testify/require" @@ -34,9 +33,8 @@ func TestCommitsToSyncWithNoPreviousSyncPoints(t *testing.T) { require.NoError(t, err) moduleIdentityOverride, err := bufmoduleref.NewModuleIdentity("buf.build", "acme", "bar") require.NoError(t, err) - repo := gittest.ScaffoldGitRepository(t, gittest.ScaffoldGitRepositoryWithOnlyInitialCommit()) - runner := command.NewRunner() - prepareGitRepoSyncWithNoPreviousSyncPoints(t, runner, repo, moduleIdentityInHEAD, gittest.DefaultBranch) + repo := gittest.ScaffoldGitRepository(t) + prepareGitRepoSyncWithNoPreviousSyncPoints(t, repo, moduleIdentityInHEAD, gittest.DefaultBranch) type testCase struct { name string branch string @@ -104,7 +102,6 @@ func TestCommitsToSyncWithNoPreviousSyncPoints(t *testing.T) { // | └o (baz) func prepareGitRepoSyncWithNoPreviousSyncPoints( t *testing.T, - runner command.Runner, repo gittest.Repository, moduleIdentity bufmoduleref.ModuleIdentity, defaultBranchName string, diff --git a/private/buf/bufsync/prepare_sync_test.go b/private/buf/bufsync/prepare_sync_test.go index 2af74a4559..48cd809922 100644 --- a/private/buf/bufsync/prepare_sync_test.go +++ b/private/buf/bufsync/prepare_sync_test.go @@ -70,7 +70,7 @@ func TestPrepareSyncDuplicateIdentities(t *testing.T) { func(tc testCase) { t.Run(tc.name, func(t *testing.T) { t.Parallel() - repo := gittest.ScaffoldGitRepository(t, gittest.ScaffoldGitRepositoryWithOnlyInitialCommit()) + repo := gittest.ScaffoldGitRepository(t) prepareGitRepoMultiModule(t, repo, tc.modulesIdentitiesInHEAD) var moduleDirs []string for moduleDir := range tc.modulesIdentitiesInHEAD {