MCPcopy Create free account
hub / github.com/containerd/nerdctl / TestValidateFluentdLoggerOpts

Function TestValidateFluentdLoggerOpts

pkg/logging/fluentd_logger_test.go:57–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

55}
56
57func TestValidateFluentdLoggerOpts(t *testing.T) {
58 type args struct {
59 config map[string]string
60 }
61 tests := []struct {
62 name string
63 args args
64 wantErr bool
65 }{
66 // TODO: Add test cases.
67 {name: "empty", args: args{config: map[string]string{}}, wantErr: false},
68 {name: "invalid", args: args{config: map[string]string{"foo": "bar"}}, wantErr: true},
69 }
70 for _, tt := range tests {
71 t.Run(tt.name, func(t *testing.T) {
72 if err := ValidateFluentdLoggerOpts(tt.args.config); (err != nil) != tt.wantErr {
73 t.Errorf("ValidateFluentdLoggerOpts() error = %v, wantErr %v", err, tt.wantErr)
74 }
75 })
76 }
77}
78
79func TestParseFluentdConfig(t *testing.T) {
80 type args struct {

Callers

nothing calls this directly

Calls 2

RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…