diff --git a/pkg/apiserver/api_installer_test.go b/pkg/apiserver/api_installer_test.go index 1dd42cce2cd..302db3e85e2 100644 --- a/pkg/apiserver/api_installer_test.go +++ b/pkg/apiserver/api_installer_test.go @@ -28,14 +28,14 @@ import ( func TestScopeNamingGenerateLink(t *testing.T) { selfLinker := &setTestSelfLinker{ t: t, - expectedSet: "/api/v1beta3/namespaces/other/services/foo", + expectedSet: "/api/v1/namespaces/other/services/foo", name: "foo", namespace: "other", } s := scopeNaming{ meta.RESTScopeNamespace, selfLinker, - "/api/v1beta3/namespaces/{namespace}/services/{name}", + "/api/v1/namespaces/{namespace}/services/{name}", true, } service := &api.Service{ diff --git a/pkg/client/record/events_cache_test.go b/pkg/client/record/events_cache_test.go index f086ef88ef8..3adbd9cf44b 100644 --- a/pkg/client/record/events_cache_test.go +++ b/pkg/client/record/events_cache_test.go @@ -67,7 +67,7 @@ func TestAddOrUpdateEventExisting(t *testing.T) { Name: "anOkName", Namespace: "someNamespace", UID: "C934D3234CD0242", - APIVersion: "v1beta2", + APIVersion: "version", }, Source: api.EventSource{ Component: "kubelet", @@ -88,7 +88,7 @@ func TestAddOrUpdateEventExisting(t *testing.T) { Name: "anOkName", Namespace: "someNamespace", UID: "C934D3234CD0242", - APIVersion: "v1beta2", + APIVersion: "version", }, Source: api.EventSource{ Component: "kubelet", @@ -119,7 +119,7 @@ func TestGetEventNoExisting(t *testing.T) { Name: "iAmAController", Namespace: "IHaveANamespace", UID: "9039D34AFBCDA42", - APIVersion: "v1beta3", + APIVersion: "version", }, Source: api.EventSource{ Component: "kubelet", diff --git a/pkg/kubectl/cmd/expose_test.go b/pkg/kubectl/cmd/expose_test.go index f1189fc6127..09746fdfef3 100644 --- a/pkg/kubectl/cmd/expose_test.go +++ b/pkg/kubectl/cmd/expose_test.go @@ -49,7 +49,7 @@ func TestRunExposeService(t *testing.T) { }, input: &api.Service{ ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, - TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1beta3"}, + TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, @@ -57,7 +57,7 @@ func TestRunExposeService(t *testing.T) { flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test"}, output: &api.Service{ ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "12", Labels: map[string]string{"svc": "test"}}, - TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1beta3"}, + TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -82,7 +82,7 @@ func TestRunExposeService(t *testing.T) { }, input: &api.Service{ ObjectMeta: api.ObjectMeta{Name: "mayor", Namespace: "default", ResourceVersion: "12"}, - TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1beta3"}, + TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"run": "this"}, }, @@ -91,7 +91,7 @@ func TestRunExposeService(t *testing.T) { flags: map[string]string{"selector": "run=this", "port": "80", "labels": "runas=amayor"}, output: &api.Service{ ObjectMeta: api.ObjectMeta{Name: "mayor", Namespace: "default", ResourceVersion: "12", Labels: map[string]string{"runas": "amayor"}}, - TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1beta3"}, + TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { diff --git a/pkg/kubectl/cmd/util/factory_test.go b/pkg/kubectl/cmd/util/factory_test.go index ead27c09474..e24609d416a 100644 --- a/pkg/kubectl/cmd/util/factory_test.go +++ b/pkg/kubectl/cmd/util/factory_test.go @@ -117,7 +117,7 @@ func TestLabelsForObject(t *testing.T) { name: "successful re-use of labels", object: &api.Service{ ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", Labels: map[string]string{"svc": "test"}}, - TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1beta3"}, + TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "svc=test", err: nil, @@ -126,7 +126,7 @@ func TestLabelsForObject(t *testing.T) { name: "empty labels", object: &api.Service{ ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", Labels: map[string]string{}}, - TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1beta3"}, + TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "", err: nil, @@ -135,7 +135,7 @@ func TestLabelsForObject(t *testing.T) { name: "nil labels", object: &api.Service{ ObjectMeta: api.ObjectMeta{Name: "zen", Namespace: "test", Labels: nil}, - TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1beta3"}, + TypeMeta: api.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "", err: nil,