remove dup pkg and update reference

This commit is contained in:
ymqytw
2017-08-31 21:32:12 -07:00
parent 006f80e35d
commit 93be3f7735
21 changed files with 112 additions and 933 deletions

View File

@@ -24,9 +24,10 @@ import (
utilerrors "k8s.io/apimachinery/pkg/util/errors"
// This dependency is needed to register API types.
oapi "k8s.io/kube-openapi/pkg/util/proto"
tst "k8s.io/kube-openapi/pkg/util/proto/testing"
_ "k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi"
tst "k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi/testing"
"k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi/validation"
)
@@ -37,7 +38,7 @@ var _ = Describe("resource validation using OpenAPI Schema", func() {
BeforeEach(func() {
s, err := fakeSchema.OpenAPISchema()
Expect(err).To(BeNil())
resources, err := openapi.NewOpenAPIData(s)
resources, err := oapi.NewOpenAPIData(s, openapi.ParseGroupVersionKind)
Expect(err).To(BeNil())
validator = validation.NewSchemaValidation(resources)
Expect(validator).ToNot(BeNil())