mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-16 00:06:55 +00:00
NotRegisteredErr for known kinds not registered in target GV
The dynamic client uses NotRegisteredErr to fall back to core v1 if ListOptions is not known in the given GV. This commit fixes the case that ListOptions is known in some group, but not in the given one. Kubernetes-commit: 2ece9e4dec483c9712d09dc7c1fd5be1fe68ea62
This commit is contained in:
parent
5a21aa58a2
commit
6434e2e4bb
@ -556,3 +556,11 @@ func TestPatch(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestVersionedParameterEncoderWithV1Fallback(t *testing.T) {
|
||||
enc := VersionedParameterEncoderWithV1Fallback
|
||||
_, err := enc.EncodeParameters(&metav1.ListOptions{}, schema.GroupVersion{Group: "foo.bar.com", Version: "v4"})
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user