Exemplo n.º 1
0
func setupOriginAndClones(originLocation, cloneLocation string) (GitRepo, GitRepo) {
	origin := RepoLocatedAt(originLocation)
	git.Init(origin.root)
	git.SetupBaselineFiles(origin.root, "a.txt", "alice/bob/b.txt")
	git.GitClone(origin.root, cloneLocation)
	return origin, RepoLocatedAt(cloneLocation)
}
Exemplo n.º 2
0
func TestCloningARepoToAnotherWorks(t *testing.T) {
	cleanTestData()
	repo := RepoLocatedAt("data/testLocation1")
	git.Init(repo.root)
	git.SetupBaselineFiles(repo.root, "a.txt", "alice/bob/b.txt")
	git.GitClone(repo.root, "data/somewhereElse/testLocationClone")
	verifyPresenceOfGitRepoWithCommits("data/testLocation1", 1, t)
	verifyPresenceOfGitRepoWithCommits("data/somewhereElse/testLocationClone", 1, t)
}