From 3fc4bd5e785e68674406f28e07aad8acd608c431 Mon Sep 17 00:00:00 2001 From: jsirianni Date: Tue, 25 May 2021 20:56:41 -0400 Subject: [PATCH] make encoding inline and re-enable encoding lower|upper tests --- operator/builtin/input/file/config.go | 2 +- operator/builtin/input/file/config_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/operator/builtin/input/file/config.go b/operator/builtin/input/file/config.go index 08a64cabf..c3052e68f 100644 --- a/operator/builtin/input/file/config.go +++ b/operator/builtin/input/file/config.go @@ -48,7 +48,7 @@ type InputConfig struct { FingerprintSize helper.ByteSize `json:"fingerprint_size,omitempty" yaml:"fingerprint_size,omitempty"` MaxLogSize helper.ByteSize `json:"max_log_size,omitempty" yaml:"max_log_size,omitempty"` MaxConcurrentFiles int `json:"max_concurrent_files,omitempty" yaml:"max_concurrent_files,omitempty"` - Encoding helper.EncodingConfig `json:"encoding,omitempty" yaml:"encoding,omitempty"` + Encoding helper.EncodingConfig `json:",inline,omitempty" yaml:",inline,omitempty"` } // Build will build a file input operator from the supplied configuration diff --git a/operator/builtin/input/file/config_test.go b/operator/builtin/input/file/config_test.go index 340d6831f..f7e919a30 100644 --- a/operator/builtin/input/file/config_test.go +++ b/operator/builtin/input/file/config_test.go @@ -482,7 +482,7 @@ func TestConfig(t *testing.T) { return cfg }(), }, - /*{ + { Name: "encoding_lower", ExpectErr: false, Expect: func() *InputConfig { @@ -499,7 +499,7 @@ func TestConfig(t *testing.T) { cfg.Encoding = helper.EncodingConfig{Encoding: "UTF-16lE"} return cfg }(), - },*/ + }, } for _, tc := range cases {