MCPcopy Index your code
hub / github.com/docker/cli / TestLoadLogging

Function TestLoadLogging

cli/compose/loader/merge_test.go:30–230  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

28}
29
30func TestLoadLogging(t *testing.T) {
31 loggingCases := []struct {
32 name string
33 loggingBase map[string]any
34 loggingOverride map[string]any
35 expected *types.LoggingConfig
36 }{
37 {
38 name: "no_override_driver",
39 loggingBase: map[string]any{
40 "logging": map[string]any{
41 "driver": "json-file",
42 "options": map[string]any{
43 "frequency": "2000",
44 "timeout": "23",
45 },
46 },
47 },
48 loggingOverride: map[string]any{
49 "logging": map[string]any{
50 "options": map[string]any{
51 "timeout": "360",
52 "pretty-print": "on",
53 },
54 },
55 },
56 expected: &types.LoggingConfig{
57 Driver: "json-file",
58 Options: map[string]string{
59 "frequency": "2000",
60 "timeout": "360",
61 "pretty-print": "on",
62 },
63 },
64 },
65 {
66 name: "override_driver",
67 loggingBase: map[string]any{
68 "logging": map[string]any{
69 "driver": "json-file",
70 "options": map[string]any{
71 "frequency": "2000",
72 "timeout": "23",
73 },
74 },
75 },
76 loggingOverride: map[string]any{
77 "logging": map[string]any{
78 "driver": "syslog",
79 "options": map[string]any{
80 "timeout": "360",
81 "pretty-print": "on",
82 },
83 },
84 },
85 expected: &types.LoggingConfig{
86 Driver: "syslog",
87 Options: map[string]string{

Callers

nothing calls this directly

Calls 1

LoadFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…