Allow server and client to take api version as argument
* Defaults to v1beta1 * apiserver takes -storage_version which controls etcd storage version and the version of the client used to connect to other apiservers * Changed signature of client.New to add version parameter * All controller code and component code prefers the oldest (most common) server version
This commit is contained in:
@@ -117,7 +117,7 @@ func TestSyncReplicationControllerDoesNothing(t *testing.T) {
|
||||
ResponseBody: string(body),
|
||||
}
|
||||
testServer := httptest.NewTLSServer(&fakeHandler)
|
||||
client := client.NewOrDie(testServer.URL, nil)
|
||||
client := client.NewOrDie(testServer.URL, "v1beta1", nil)
|
||||
|
||||
fakePodControl := FakePodControl{}
|
||||
|
||||
@@ -137,7 +137,7 @@ func TestSyncReplicationControllerDeletes(t *testing.T) {
|
||||
ResponseBody: string(body),
|
||||
}
|
||||
testServer := httptest.NewTLSServer(&fakeHandler)
|
||||
client := client.NewOrDie(testServer.URL, nil)
|
||||
client := client.NewOrDie(testServer.URL, "v1beta1", nil)
|
||||
|
||||
fakePodControl := FakePodControl{}
|
||||
|
||||
@@ -157,7 +157,7 @@ func TestSyncReplicationControllerCreates(t *testing.T) {
|
||||
ResponseBody: string(body),
|
||||
}
|
||||
testServer := httptest.NewTLSServer(&fakeHandler)
|
||||
client := client.NewOrDie(testServer.URL, nil)
|
||||
client := client.NewOrDie(testServer.URL, "v1beta1", nil)
|
||||
|
||||
fakePodControl := FakePodControl{}
|
||||
|
||||
@@ -177,7 +177,7 @@ func TestCreateReplica(t *testing.T) {
|
||||
ResponseBody: string(body),
|
||||
}
|
||||
testServer := httptest.NewTLSServer(&fakeHandler)
|
||||
client := client.NewOrDie(testServer.URL, nil)
|
||||
client := client.NewOrDie(testServer.URL, "v1beta1", nil)
|
||||
|
||||
podControl := RealPodControl{
|
||||
kubeClient: client,
|
||||
@@ -227,7 +227,7 @@ func TestCreateReplica(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSyncronize(t *testing.T) {
|
||||
func TestSynchonize(t *testing.T) {
|
||||
controllerSpec1 := api.ReplicationController{
|
||||
JSONBase: api.JSONBase{APIVersion: "v1beta1"},
|
||||
DesiredState: api.ReplicationControllerState{
|
||||
@@ -310,7 +310,7 @@ func TestSyncronize(t *testing.T) {
|
||||
t.Errorf("Unexpected request for %v", req.RequestURI)
|
||||
})
|
||||
testServer := httptest.NewServer(mux)
|
||||
client := client.NewOrDie(testServer.URL, nil)
|
||||
client := client.NewOrDie(testServer.URL, "v1beta1", nil)
|
||||
manager := NewReplicationManager(client)
|
||||
fakePodControl := FakePodControl{}
|
||||
manager.podControl = &fakePodControl
|
||||
|
Reference in New Issue
Block a user