From 8ce98ba3d4d5ff60de7c1cc3fb605902be4bf64b Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Wed, 21 Dec 2016 16:01:11 -0800 Subject: [PATCH] Make one of the go2idl unit tests pass in a sandbox. --- cmd/libs/go2idl/openapi-gen/generators/BUILD | 5 +--- .../openapi-gen/generators/openapi_test.go | 26 ++----------------- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/cmd/libs/go2idl/openapi-gen/generators/BUILD b/cmd/libs/go2idl/openapi-gen/generators/BUILD index bcb45b2d96b43..aa09cae3836ad 100644 --- a/cmd/libs/go2idl/openapi-gen/generators/BUILD +++ b/cmd/libs/go2idl/openapi-gen/generators/BUILD @@ -26,10 +26,7 @@ go_test( name = "go_default_test", srcs = ["openapi_test.go"], library = "go_default_library", - tags = [ - "automanaged", - "skip", - ], + tags = ["automanaged"], deps = [ "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/gengo/generator", diff --git a/cmd/libs/go2idl/openapi-gen/generators/openapi_test.go b/cmd/libs/go2idl/openapi-gen/generators/openapi_test.go index 613856d61bcb1..f4939f31e8e5e 100644 --- a/cmd/libs/go2idl/openapi-gen/generators/openapi_test.go +++ b/cmd/libs/go2idl/openapi-gen/generators/openapi_test.go @@ -70,11 +70,6 @@ func TestSimple(t *testing.T) { err, assert, buffer := testOpenAPITypeWritter(t, ` package foo -import ( - "time" - "k8s.io/kubernetes/pkg/util/intstr" -) - // Blah is a test. // +k8s:openapi=true type Blah struct { @@ -110,12 +105,8 @@ type Blah struct { Float64 float64 // A simple float32 Float32 float32 - // A simple time - Time time.Time // a base64 encoded characters ByteArray []byte - // an int or string type - IntOrString intstr.IntOrString } `) if err != nil { @@ -224,13 +215,6 @@ Type: []string{"number"}, Format: "float", }, }, -"Time": { -SchemaProps: spec.SchemaProps{ -Description: "A simple time", -Type: []string{"string"}, -Format: "date-time", -}, -}, "ByteArray": { SchemaProps: spec.SchemaProps{ Description: "a base64 encoded characters", @@ -238,18 +222,12 @@ Type: []string{"string"}, Format: "byte", }, }, -"IntOrString": { -SchemaProps: spec.SchemaProps{ -Description: "an int or string type", -Ref: spec.MustCreateRef("#/definitions/intstr.IntOrString"), -}, }, -}, -Required: []string{"String","Int64","Int32","Int16","Int8","Uint","Uint64","Uint32","Uint16","Uint8","Byte","Bool","Float64","Float32","Time","ByteArray","IntOrString"}, +Required: []string{"String","Int64","Int32","Int16","Int8","Uint","Uint64","Uint32","Uint16","Uint8","Byte","Bool","Float64","Float32","ByteArray"}, }, }, Dependencies: []string{ -"intstr.IntOrString",}, +}, }, `, buffer.String()) }