Skip to content

Commit

Permalink
Fix static failure from package: vendor/k8s.io/kube-aggregator
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowMango committed Aug 21, 2019
1 parent 7a81ecd commit 9b34fb0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
4 changes: 0 additions & 4 deletions hack/.staticcheck_failures
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,6 @@ vendor/k8s.io/code-generator/cmd/client-gen/generators/fake
vendor/k8s.io/code-generator/cmd/client-gen/generators/util
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf
vendor/k8s.io/component-base/metrics
vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration
vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper
vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister
vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator
vendor/k8s.io/kubectl/pkg/cmd/annotate
vendor/k8s.io/kubectl/pkg/cmd/apply
vendor/k8s.io/kubectl/pkg/cmd/certificates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
var (
a APIServiceConditionType = "A"
b APIServiceConditionType = "B"
c APIServiceConditionType = "C"
)

func TestGetAPIServiceConditionByType(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
var (
a v1.APIServiceConditionType = "A"
b v1.APIServiceConditionType = "B"
c v1.APIServiceConditionType = "C"
)

func TestIsAPIServiceConditionTrue(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ func newAutoRegisterManagedModifiedAPIService(name string) *apiregistrationv1.AP
}
}

func newAutoRegisterManagedOnStartModifiedAPIService(name string) *apiregistrationv1.APIService {
return &apiregistrationv1.APIService{
ObjectMeta: metav1.ObjectMeta{Name: name, Labels: map[string]string{AutoRegisterManagedLabel: string("onstart")}},
Spec: apiregistrationv1.APIServiceSpec{
Group: "something",
},
}
}

func newAPIService(name string) *apiregistrationv1.APIService {
return &apiregistrationv1.APIService{
ObjectMeta: metav1.ObjectMeta{Name: name},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ func BuildAndRegisterAggregator(downloader *Downloader, delegationTarget server.
}

// Install handler
s.openAPIVersionedService, err = handler.RegisterOpenAPIVersionedService(
specToServe, "/openapi/v2", pathHandler)
s.openAPIVersionedService, err = handler.NewOpenAPIService(specToServe)
if err != nil {
return nil, err
}
err = s.openAPIVersionedService.RegisterOpenAPIVersionedService("/openapi/v2", pathHandler)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9b34fb0

Please sign in to comment.