Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pkg/stanza] Deduplicate design doc, remove operator fields #11412

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 0 additions & 116 deletions pkg/stanza/internal/fileconsumer/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ import (

func TestUnmarshal(t *testing.T) {
cases := []operatortest.ConfigUnmarshalTest{
{
Name: "default",
ExpectErr: false,
Expect: NewConfig(),
},
{

Name: "extra_field",
ExpectErr: false,
Expect: NewConfig(),
},
{
Name: "include_one",
ExpectErr: false,
Expand Down Expand Up @@ -273,111 +262,6 @@ func TestUnmarshal(t *testing.T) {
return cfg
}(),
},
{
Name: "include_file_name_lower",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFileName = true
return cfg
}(),
},
{
Name: "include_file_name_upper",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFileName = true
return cfg
}(),
},
{
Name: "include_file_name_on",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFileName = true
return cfg
}(),
},
{
Name: "include_file_name_yes",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFileName = true
return cfg
}(),
},
{
Name: "include_file_path_lower",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFilePath = true
return cfg
}(),
},
{
Name: "include_file_path_upper",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFilePath = true
return cfg
}(),
},
{
Name: "include_file_path_on",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFilePath = true
return cfg
}(),
},
{
Name: "include_file_path_yes",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFilePath = true
return cfg
}(),
},
{
Name: "include_file_path_off",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFilePath = false
return cfg
}(),
},
{
Name: "include_file_path_no",
ExpectErr: false,
Expect: func() *Config {
cfg := NewConfig()
cfg.Include = append(cfg.Include, "one.log")
cfg.IncludeFilePath = false
return cfg
}(),
},
{
Name: "include_file_path_nonbool",
ExpectErr: true,
Expect: nil,
},
{
Name: "multiline_line_start_string",
ExpectErr: false,
Expand Down
1 change: 0 additions & 1 deletion pkg/stanza/internal/fileconsumer/testdata/default.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
encoding: "utf-16le"
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
encoding: "UTF-16lE"
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type: file_input
include:
- "*.log"
exclude:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type: file_input
include:
- "*.log"
exclude:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type: file_input
include:
- "*.log"
exclude:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type: file_input
include:
- "*.log"
exclude:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
include: [ "*.log" ]
exclude: [ "a.log", "b.log" ]
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type: file_input
include:
- "*.log"
exclude: "aRandomString"
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type: file_input
include:
- "*.log"
exclude:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type: file_input
include:
- "*.log"
exclude:
Expand Down
2 changes: 0 additions & 2 deletions pkg/stanza/internal/fileconsumer/testdata/extra_field.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
fingerprint_size: 1KB
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
fingerprint_size: 1KiB
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
fingerprint_size: 1kb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
fingerprint_size: 1kib
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
fingerprint_size: 1.1kb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
fingerprint_size: 1000
2 changes: 0 additions & 2 deletions pkg/stanza/internal/fileconsumer/testdata/id_custom.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
include:
- "*.log"
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
include:
- "**.log"
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
include:
- "directory/**/*.log"
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
include:
- "**/directory/**/*.log"
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
include: [ "a.log", "b.log" ]
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
include: "justwords"
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type: file_input
include:
- one.log
- two.log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
include:
- one.log
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
max_concurrent_files: 9223372036854775807
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
max_log_size: 1TOFU
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
max_log_size: 1mib
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
max_log_size: 1MiB
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
max_log_size: 1mib
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
max_log_size: 1MiB
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
multiline:
that_random_field: "this should go nowhere"
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
multiline:
line_end_pattern: '%'
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
multiline:
line_end_pattern: 'Start'
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
multiline:
line_start_pattern: '%'
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
type: file_input
multiline:
line_start_pattern: 'Start'
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
poll_interval: 1000ms
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
poll_interval: 1ms
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
poll_interval: 1s
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
poll_interval: 1
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type: file_input
start_at: "beginning"