diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index fff60853807..7d2170c2b7b 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -124,7 +124,7 @@ for version in "${kube_api_versions[@]}"; do -s "http://127.0.0.1:${API_PORT}" --match-server-version ) - [ "$(kubectl get nodes -t '{{ .apiVersion }}' "${kube_flags[@]}")" == "v1beta3" ] + [ "$(kubectl get nodes -t '{{ .apiVersion }}' "${kube_flags[@]}")" == "v1" ] else kube_flags=( -s "http://127.0.0.1:${API_PORT}" diff --git a/pkg/kubectl/rolling_updater_test.go b/pkg/kubectl/rolling_updater_test.go index 790d49d127d..eda04ab1bd1 100644 --- a/pkg/kubectl/rolling_updater_test.go +++ b/pkg/kubectl/rolling_updater_test.go @@ -672,7 +672,7 @@ func TestUpdateWithRetries(t *testing.T) { Codec: codec, Client: client.HTTPClientFunc(func(req *http.Request) (*http.Response, error) { switch p, m := req.URL.Path, req.Method; { - case p == "/api/"+latest.Version+"/namespaces/default/replicationcontrollers/rc" && m == "PUT": + case p == testapi.ResourcePath("replicationcontrollers", "default", "rc") && m == "PUT": update := updates[0] updates = updates[1:] // We should always get an update with a valid rc even when the get fails. The rc should always @@ -685,7 +685,7 @@ func TestUpdateWithRetries(t *testing.T) { delete(c.Spec.Selector, "baz") } return update, nil - case p == "/api/"+latest.Version+"/namespaces/default/replicationcontrollers/rc" && m == "GET": + case p == testapi.ResourcePath("replicationcontrollers", "default", "rc") && m == "GET": get := gets[0] gets = gets[1:] return get, nil @@ -695,7 +695,7 @@ func TestUpdateWithRetries(t *testing.T) { } }), } - clientConfig := &client.Config{Version: latest.Version} + clientConfig := &client.Config{Version: testapi.Version()} client := client.NewOrDie(clientConfig) client.Client = fakeClient.Client