From 61b4f1ba84ccd65a1bfad436ab1fa1f511bff580 Mon Sep 17 00:00:00 2001 From: John Pignata Date: Tue, 2 Jan 2018 20:43:09 -0500 Subject: [PATCH] Simplify test command creation --- git/main_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/git/main_test.go b/git/main_test.go index c454292..6228c05 100644 --- a/git/main_test.go +++ b/git/main_test.go @@ -27,10 +27,9 @@ func TestGetShortSha(t *testing.T) { os.Chdir(dir) defer os.Chdir(cwd) - gitInit := exec.Command("git", "init") - gitInit.Run() + exec.Command("git", "init").Run() - gitCommit := exec.Command("git", "commit", "--allow-empty", "--allow-empty-message", "--message", "''") + gitCommit := exec.Command("git", "commit", "--allow-empty", "--message", "dummy commit") commitOutput, err := gitCommit.CombinedOutput() if err != nil {