v0.31.1 minor fixes and updates
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
This commit is contained in:
1 parent
6bd5e12a60
commit
c2e3d669da
10 files changed
+14
-18
No files matched your search
@@ -85,7 +85,7 @@ type HeartbeatConfig struct {
|
||||
|
||||
// FormatConfig is how a pipeline writes its entries
|
||||
type FormatConfig struct {
|
||||
Type string `toml:"type" default:"raw" lw:"enum=raw|txt|text|json" help:"entry format; text is txt"`
|
||||
Type string `toml:"type" default:"raw" lw:"enum=raw|txt|json" help:"entry format"`
|
||||
Flags int64 `toml:"flags,omitempty" lw:"zero=by type" help:"formatter flags"`
|
||||
TimestampFormat string `toml:"timestamp_format,omitempty" lw:"zero=RFC 3339" help:"Go time layout of timestamps"`
|
||||
SanitizerPolicy string `toml:"sanitizer_policy,omitempty" lw:"enum=raw|json|txt|shell,zero=by type" help:"how control characters are escaped"`
|
||||
|
||||
@@ -58,10 +58,6 @@ func TestZeroDefaultsAndNegatives(t *testing.T) {
|
||||
if err != nil || chain.BackoffMaxMS != 30000 {
|
||||
t.Fatalf("backoff maximum below the minimum: %+v %v", chain, err)
|
||||
}
|
||||
format := FormatConfig{Type: "text"}
|
||||
if err := Settle(&format); err != nil {
|
||||
t.Fatalf("format text: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Command-line text and JSON numbers become the kinds the options declare, so
|
||||
@@ -123,6 +119,9 @@ func TestValidateConfigNamesThePath(t *testing.T) {
|
||||
"color: must be one of auto, always, never, got \"\"": func(c *Config) {
|
||||
c.Color = ""
|
||||
},
|
||||
`pipelines[0].flow.format.type: must be one of raw, txt, json, got "text"`: func(c *Config) {
|
||||
c.Pipelines[0].Flow.Format = &FormatConfig{Type: "text"}
|
||||
},
|
||||
"pipelines[0].flow.heartbeat.interval_ms: must be at least 100, got 10": func(c *Config) {
|
||||
c.Pipelines[0].Flow.Heartbeat = &HeartbeatConfig{IntervalMS: 10}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user