mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Make the validation types match the pending ReasonCauses
This commit is contained in:
@@ -24,23 +24,27 @@ import (
|
||||
func TestMakeFuncs(t *testing.T) {
|
||||
testCases := []struct {
|
||||
fn func() ValidationError
|
||||
expected ValidationErrorEnum
|
||||
expected ValidationErrorType
|
||||
}{
|
||||
{
|
||||
func() ValidationError { return NewInvalid("f", "v") },
|
||||
Invalid,
|
||||
ValidationErrorTypeInvalid,
|
||||
},
|
||||
{
|
||||
func() ValidationError { return NewNotSupported("f", "v") },
|
||||
NotSupported,
|
||||
ValidationErrorTypeNotSupported,
|
||||
},
|
||||
{
|
||||
func() ValidationError { return NewDuplicate("f", "v") },
|
||||
Duplicate,
|
||||
ValidationErrorTypeDuplicate,
|
||||
},
|
||||
{
|
||||
func() ValidationError { return NewNotFound("f", "v") },
|
||||
NotFound,
|
||||
ValidationErrorTypeNotFound,
|
||||
},
|
||||
{
|
||||
func() ValidationError { return NewRequired("f", "v") },
|
||||
ValidationErrorTypeRequired,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user