~ci-train-bot/ubuntu-push/ubuntu-push-ubuntu-yakkety-2021

« back to all changes in this revision

Viewing changes to testing/helpers.go

  • Committer: john.lenton at canonical
  • Date: 2014-03-20 12:15:47 UTC
  • mfrom: (81 ubuntu-push)
  • mto: This revision was merged to the branch mainline in revision 85.
  • Revision ID: john.lenton@canonical.com-20140320121547-i544is8492ulfykx
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import (
21
21
        "fmt"
22
 
        "launchpad.net/ubuntu-push/logger"
23
22
        "os"
24
23
        "path/filepath"
25
24
        "runtime"
26
25
        "strings"
27
26
        "sync"
 
27
 
 
28
        "launchpad.net/ubuntu-push/logger"
28
29
)
29
30
 
30
31
type captureHelper struct {
72
73
        helper *captureHelper
73
74
}
74
75
 
75
 
// NewTestLogger can be used in tests instead of NewSimpleLogger(FromMinimalLogger).
 
76
// NewTestLogger can be used in tests instead of
 
77
// NewSimpleLogger(FromMinimalLogger).
76
78
func NewTestLogger(minLog logger.MinimalLogger, level string) *TestLogger {
77
79
        h := &captureHelper{outputFunc: minLog.Output}
78
80
        log := &TestLogger{