Files
docker-machine/libmachine/log/log_test.go
Kent Wang da26cab450 Remove TerminalLogger.
Signed-off-by: Kent Wang <pragkent@gmail.com>
2015-10-13 11:31:46 +08:00

20 lines
529 B
Go

package log
import "testing"
func TestStandardLoggerWithFields(t *testing.T) {
logger := StandardLogger{}
withFieldsLogger := logger.WithFields(Fields{
"foo": "bar",
"spam": "eggs",
})
withFieldsStandardLogger, ok := withFieldsLogger.(StandardLogger)
if !ok {
t.Fatal("Type assertion to StandardLogger failed")
}
expectedOutFields := "\t\t foo=bar spam=eggs"
if withFieldsStandardLogger.fieldOut != expectedOutFields {
t.Fatalf("Expected %q, got %q", expectedOutFields, withFieldsStandardLogger.fieldOut)
}
}