logs_test.go 423 B

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