Skip to content

Commit

Permalink
fix: fix windows test case
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Oct 28, 2024
1 parent 18e3b97 commit 3c1a6cf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/git/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package git

import (
"bytes"
"fmt"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -161,9 +160,6 @@ func TestCloneWithOptions(t *testing.T) {
err = cmd.Run()
assert.Equal(t, err, nil)

// Construct the file URL for the local bare repository
bareRepoURL := fmt.Sprintf("file://%s", bareRepoPath)

// Clone the local bare repository as a normal repository and checkout a commit
tmpdir, err := os.MkdirTemp("", "clone_non_bare_repo")
assert.Equal(t, err, nil)
Expand All @@ -173,7 +169,7 @@ func TestCloneWithOptions(t *testing.T) {
}()

repo, err := CloneWithOpts(
WithRepoURL(bareRepoURL),
WithRepoURL(bareRepoPath),
WithCommit("4e59d5852cd76542f9f0ec65e5773ca9f4e02462"),
WithWriter(&buf),
WithLocalPath(tmpdir),
Expand Down

0 comments on commit 3c1a6cf

Please sign in to comment.