Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2966)

Issue 19070043: testing/checkers/log: Clearer failures

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by jameinel
Modified:
10 years, 6 months ago
Reviewers:
mp+193022, axw
Visibility:
Public.

Description

testing/checkers/log: Clearer failures When Andrew changed the LogMatches function to only assert the existence of messages he accidentally removed the work I had done to give clearer messages when there was a problem. This changes some types around and updates the params values like we did before. So that instead of getting: log_test.go:47: c.Check(log, jc.LogMatches, []string{"foo bar", "a2345"}) ... obtained []loggo.TestLogValues = []loggo.TestLogValues{loggo.TestLogValues{Level:0x3, Module:"", Filename:"", Line:0, Timestamp:time.Time{sec:0, nsec:0, loc:(*time.Location)(nil)}, Message:"foo bar"}, loggo.TestLogValues{Level:0x3, Module:"", Filename:"", Line:0, Timestamp:time.Time{sec:0, nsec:0, loc:(*time.Location)(nil)}, Message:"12345"}} ... expected []string = []string{"foo bar", "a2345"} We now get: log_test.go:47: c.Check(log, jc.LogMatches, []string{"foo bar", "a2345"}) ... obtained checkers.SimpleMessages = SimpleMessages{ INFO 12345 } ... expected checkers.SimpleMessages = SimpleMessages{ UNSPECIFIED a2345 } https://code.launchpad.net/~jameinel/juju-core/log-matcher-cleanup/+merge/193022 (do not edit description out of merge proposal)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -5 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M testing/checkers/log.go View 6 chunks +26 lines, -5 lines 0 comments Download

Messages

Total messages: 2
jameinel
Please take a look.
10 years, 6 months ago (2013-10-29 09:34:42 UTC) #1
axw
10 years, 6 months ago (2013-10-31 03:52:44 UTC) #2
On 2013/10/29 09:34:42, jameinel wrote:
> Please take a look.

Sorry about that. LGTM.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b