change v1beta3 to v1 in test cases

This commit is contained in:
Chao Xu 2015-06-03 17:50:22 -07:00
parent 2ee8eb67a9
commit 6b81c064ed
4 changed files with 12 additions and 12 deletions

View File

@ -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{

View File

@ -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",

View File

@ -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{
{

View File

@ -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,