Updating components to use v1beta3

This commit is contained in:
nikhiljindal
2015-04-02 13:15:39 -07:00
parent e49424785e
commit f2b72931fc
16 changed files with 40 additions and 35 deletions

View File

@@ -30,7 +30,7 @@ import (
)
// Version is the string that represents the current external default version.
const Version = "v1beta1"
const Version = "v1beta3"
// OldestVersion is the string that represents the oldest server version supported,
// for client code that wants to hardcode the lowest common denominator.
@@ -46,7 +46,7 @@ var Versions = []string{"v1beta1", "v1beta2", "v1beta3"}
// the latest supported version. Use this Codec when writing to
// disk, a data store that is not dynamically versioned, or in tests.
// This codec can decode any object that Kubernetes is aware of.
var Codec = v1beta1.Codec
var Codec = v1beta3.Codec
// accessor is the shared static metadata accessor for the API.
var accessor = meta.NewAccessor()

View File

@@ -72,10 +72,11 @@ func TestInterfacesFor(t *testing.T) {
}
func TestRESTMapper(t *testing.T) {
if v, k, err := RESTMapper.VersionAndKindForResource("replicationControllers"); err != nil || v != Version || k != "ReplicationController" {
// TODO: This test does not seem right. The version returned here depends on the order in which API versions were registered. This will just return the API version that was registered first. Fix this.
if v, k, err := RESTMapper.VersionAndKindForResource("replicationControllers"); err != nil || v != "v1beta1" || k != "ReplicationController" {
t.Errorf("unexpected version mapping: %s %s %v", v, k, err)
}
if v, k, err := RESTMapper.VersionAndKindForResource("replicationcontrollers"); err != nil || v != Version || k != "ReplicationController" {
if v, k, err := RESTMapper.VersionAndKindForResource("replicationcontrollers"); err != nil || v != "v1beta1" || k != "ReplicationController" {
t.Errorf("unexpected version mapping: %s %s %v", v, k, err)
}