test: make ValidateCount throw an error instead of a log

We can either fix it here or at every callsite. Every callsite is
currently using this method incorrectly.

Signed-off-by: Mike Danese <mikedanese@google.com>
This commit is contained in:
Mike Danese
2016-01-13 17:43:52 -08:00
parent 39e0703ae6
commit 39c7ea57b0
3 changed files with 32 additions and 6 deletions

View File

@@ -79,7 +79,7 @@ func (f *FakeHandler) ValidateRequestCount(t TestInterface, count int) bool {
defer f.lock.Unlock()
if f.requestCount != count {
ok = false
t.Logf("Expected %d call, but got %d. Only the last call is recorded and checked.", count, f.requestCount)
t.Errorf("Expected %d call, but got %d. Only the last call is recorded and checked.", count, f.requestCount)
}
f.hasBeenChecked = true
return ok