summaryrefslogtreecommitdiff
path: root/clone_test.go
blob: fd83fec1513f6a539b53cbcab78ffad4dc2573f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package git

import (
	"io/ioutil"
	"testing"
)

func TestClone(t *testing.T) {

	repo := createTestRepo(t)
	defer cleanupTestRepo(t, repo)

	seedTestRepo(t, repo)

	path, err := ioutil.TempDir("", "git2go")
	checkFatal(t, err)

	repo2, err := Clone(repo.Path(), path, &CloneOptions{Bare: true})
	defer cleanupTestRepo(t, repo2)

	checkFatal(t, err)
}