Stop exposing v1beta3 by default
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||
@@ -131,19 +132,16 @@ func compareBuffers(t *testing.T, generatedFile string, existing, generated byte
|
||||
}
|
||||
|
||||
func TestNoManualChangesToGenerateConversions(t *testing.T) {
|
||||
versions := []string{"v1beta3", "v1"}
|
||||
version := testapi.Version()
|
||||
fileName := fmt.Sprintf("../../pkg/api/%s/conversion_generated.go", version)
|
||||
|
||||
for _, version := range versions {
|
||||
fileName := fmt.Sprintf("../../pkg/api/%s/conversion_generated.go", version)
|
||||
existingFunctions := bufferExistingGeneratedCode(t, fileName)
|
||||
generatedFunctions := generateConversions(t, version)
|
||||
|
||||
existingFunctions := bufferExistingGeneratedCode(t, fileName)
|
||||
generatedFunctions := generateConversions(t, version)
|
||||
functionsTxt := fmt.Sprintf("%s.functions.txt", version)
|
||||
ioutil.WriteFile(functionsTxt, generatedFunctions.Bytes(), os.FileMode(0644))
|
||||
|
||||
functionsTxt := fmt.Sprintf("%s.functions.txt", version)
|
||||
ioutil.WriteFile(functionsTxt, generatedFunctions.Bytes(), os.FileMode(0644))
|
||||
|
||||
if ok := compareBuffers(t, functionsTxt, existingFunctions, generatedFunctions); ok {
|
||||
os.Remove(functionsTxt)
|
||||
}
|
||||
if ok := compareBuffers(t, functionsTxt, existingFunctions, generatedFunctions); ok {
|
||||
os.Remove(functionsTxt)
|
||||
}
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||
@@ -64,7 +65,7 @@ func generateDeepCopies(t *testing.T, version string) bytes.Buffer {
|
||||
}
|
||||
|
||||
func TestNoManualChangesToGenerateDeepCopies(t *testing.T) {
|
||||
versions := []string{"api", "v1beta3", "v1"}
|
||||
versions := []string{"api", testapi.Version()}
|
||||
|
||||
for _, version := range versions {
|
||||
fileName := ""
|
||||
|
Reference in New Issue
Block a user