diff --git a/discovery/helper_blackbox_test.go b/discovery/helper_blackbox_test.go index b3cf2591..9cd85cb1 100644 --- a/discovery/helper_blackbox_test.go +++ b/discovery/helper_blackbox_test.go @@ -28,7 +28,6 @@ import ( "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - uapi "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" @@ -87,7 +86,7 @@ func TestServerSupportsVersion(t *testing.T) { NegotiatedSerializer: scheme.Codecs, Resp: &http.Response{ StatusCode: test.statusCode, - Body: objBody(&uapi.APIVersions{Versions: test.serverVersions}), + Body: objBody(&metav1.APIVersions{Versions: test.serverVersions}), }, Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { if test.sendErr != nil { @@ -95,7 +94,7 @@ func TestServerSupportsVersion(t *testing.T) { } header := http.Header{} header.Set("Content-Type", runtime.ContentTypeJSON) - return &http.Response{StatusCode: test.statusCode, Header: header, Body: objBody(&uapi.APIVersions{Versions: test.serverVersions})}, nil + return &http.Response{StatusCode: test.statusCode, Header: header, Body: objBody(&metav1.APIVersions{Versions: test.serverVersions})}, nil }), } c := discovery.NewDiscoveryClientForConfigOrDie(&restclient.Config{}) diff --git a/util/certificate/csr/csr_test.go b/util/certificate/csr/csr_test.go index 03cff8ac..d0182abe 100644 --- a/util/certificate/csr/csr_test.go +++ b/util/certificate/csr/csr_test.go @@ -22,7 +22,6 @@ import ( certificates "k8s.io/api/certificates/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" certutil "k8s.io/client-go/util/cert" @@ -98,11 +97,11 @@ func (c *fakeClient) Create(*certificates.CertificateSigningRequest) (*certifica return &csr, nil } -func (c *fakeClient) List(opts v1.ListOptions) (*certificates.CertificateSigningRequestList, error) { +func (c *fakeClient) List(opts metav1.ListOptions) (*certificates.CertificateSigningRequestList, error) { return &certificates.CertificateSigningRequestList{}, nil } -func (c *fakeClient) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *fakeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { c.watch = watch.NewFakeWithChanSize(1, false) c.watch.Add(c.generateCSR()) c.watch.Stop()