mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Clean up and document validation strings
Also add a detail string for Required and Forbidden. Fix tests.
This commit is contained in:
@@ -105,17 +105,17 @@ func TestValidateLogFlags(t *testing.T) {
|
||||
{
|
||||
name: "since & since-time",
|
||||
flags: map[string]string{"since": "1h", "since-time": "2006-01-02T15:04:05Z"},
|
||||
expected: "only one of sinceTime or sinceSeconds can be provided",
|
||||
expected: "at most one of `sinceTime` or `sinceSeconds` may be specified",
|
||||
},
|
||||
{
|
||||
name: "negative limit-bytes",
|
||||
flags: map[string]string{"limit-bytes": "-100"},
|
||||
expected: "limitBytes must be a positive integer or nil",
|
||||
expected: "must be greater than 0",
|
||||
},
|
||||
{
|
||||
name: "negative tail",
|
||||
flags: map[string]string{"tail": "-100"},
|
||||
expected: "tailLines must be a non-negative integer or nil",
|
||||
expected: "must be greater than or equal to 0",
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in New Issue
Block a user