Move generic assertions into new test_util package
Also fixed small bug in the git package -- branches should be listed
using show-ref, not ls-remote. Apologies for tacking this change on
to this CL!
BUG=chromium:980346
TEST=run_test.sh
Change-Id: I18ee2e8d55fc50436a7cbbbb50601656000aae88
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/go/+/1712802
Reviewed-by: Benjamin Gordon <bmgordon@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>
Commit-Queue: Jack Neus <jackneus@google.com>
Tested-by: Jack Neus <jackneus@google.com>
diff --git a/internal/git/git_test.go b/internal/git/git_test.go
index 057b168..2be8fab 100644
--- a/internal/git/git_test.go
+++ b/internal/git/git_test.go
@@ -82,7 +82,7 @@
"04975f9439ff75502b33d9491155692736e05b07 refs/heads/baz\n"
CommandRunnerImpl = cmd.FakeCommandRunner{
- ExpectedCmd: []string{"git", "ls-remote", fakeGitRepo},
+ ExpectedCmd: []string{"git", "show-ref"},
ExpectedDir: fakeGitRepo,
Stdout: fakeGitData,
}
@@ -106,7 +106,7 @@
"04975f9439ff75502b33d9491155692736e05b07 refs/heads/baz\n"
CommandRunnerImpl = cmd.FakeCommandRunner{
- ExpectedCmd: []string{"git", "ls-remote", fakeGitRepo},
+ ExpectedCmd: []string{"git", "show-ref"},
ExpectedDir: fakeGitRepo,
Stdout: fakeGitData,
}