Fixes/updates based on review.

This commit is contained in:
Ratnadeep Debnath
2016-12-28 17:02:33 +05:30
parent d4561c6f51
commit 44f94cc072
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -29,18 +29,18 @@ func CreateLocalGitDirectory(t *testing.T) string {
cmd.Dir = dir
_, err := cmd.Output()
if err != nil {
fmt.Println("create local git dir", err)
t.Logf("create local git dir: %v", err)
t.Fatal(err)
}
return dir
}
func SetGitRemote(t *testing.T, dir string, remote string, remoteUrl string) {
cmd := NewCommand("git remote add newremote https://git.test.com/somerepo")
cmd := NewCommand(fmt.Sprintf("git remote add %s %s", remote, remoteUrl))
cmd.Dir = dir
_, err := cmd.Output()
if err != nil {
fmt.Println("set git remote", err)
t.Logf("set git remote: %v", err)
t.Fatal(err)
}
}
@@ -55,7 +55,7 @@ func CreateGitRemoteBranch(t *testing.T, dir string, branch string, remote strin
_, err := cmd.Output()
if err != nil {
fmt.Println("create git branch", err)
t.Logf("create git branch: %v", err)
t.Fatal(err)
}
}
+1 -1
View File
@@ -194,7 +194,7 @@ func TestGitGetCurrentBranch(t *testing.T) {
if test.expectError {
if err == nil {
t.Errorf("Expected error, got success instead!")
t.Error("Expected error, got success instead!")
}
} else {
if err != nil {