1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/logs_test.go
Brian Goff 7dff310648 Fix panic while merging log configs to nil map
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-07-12 15:24:42 -04:00

15 lines
423 B
Go

package daemon
import (
"testing"
containertypes "github.com/docker/engine-api/types/container"
)
func TestMergeAndVerifyLogConfigNilConfig(t *testing.T) {
d := &Daemon{defaultLogConfig: containertypes.LogConfig{Type: "json-file", Config: map[string]string{"max-file": "1"}}}
cfg := containertypes.LogConfig{Type: d.defaultLogConfig.Type}
if err := d.mergeAndVerifyLogConfig(&cfg); err != nil {
t.Fatal(err)
}
}