mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-04 16:40:21 +00:00
Implement dynamic admission webhooks
Also fix a bug in rest client Kubernetes-commit: d6e1140b5d3c5c9d8696b7ccda0a5f92f36033df
This commit is contained in:
committed by
Kubernetes Publisher
parent
d9ea62815a
commit
38cb1a951d
@@ -329,6 +329,16 @@ func TestResultIntoWithErrReturnsErr(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestResultIntoWithNoBodyReturnsErr(t *testing.T) {
|
||||
res := Result{
|
||||
body: []byte{},
|
||||
decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion),
|
||||
}
|
||||
if err := res.Into(&v1.Pod{}); err == nil || !strings.Contains(err.Error(), "0-length") {
|
||||
t.Errorf("should have complained about 0 length body")
|
||||
}
|
||||
}
|
||||
|
||||
func TestURLTemplate(t *testing.T) {
|
||||
uri, _ := url.Parse("http://localhost")
|
||||
r := NewRequest(nil, "POST", uri, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil)
|
||||
|
Reference in New Issue
Block a user