Merge pull request #9301 from caesarxuchao/add-v1-in-e2e

replace v1beta3 with v1 in e2e tests
This commit is contained in:
Quinton Hoole 2015-06-04 21:35:52 -07:00
commit 7e16583e04
5 changed files with 10 additions and 10 deletions

View File

@ -58,7 +58,7 @@ func CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration) {
for _, node := range nodeList.Items {
// cadvisor is not accessible directly unless its port (4194 by default) is exposed.
// Here, we access '/stats/' REST endpoint on the kubelet which polls cadvisor internally.
statsResource := fmt.Sprintf("api/v1beta3/proxy/nodes/%s/stats/", node.Name)
statsResource := fmt.Sprintf("api/v1/proxy/nodes/%s/stats/", node.Name)
By(fmt.Sprintf("Querying stats from node %s using url %s", node.Name, statsResource))
_, err = c.Get().AbsPath(statsResource).Timeout(timeout).Do().Raw()
if err != nil {

View File

@ -67,7 +67,7 @@ var _ = Describe("Downward API", func() {
Name: "POD_NAME",
ValueFrom: &api.EnvVarSource{
FieldRef: &api.ObjectFieldSelector{
APIVersion: "v1beta3",
APIVersion: "v1",
FieldPath: "metadata.name",
},
},
@ -76,7 +76,7 @@ var _ = Describe("Downward API", func() {
Name: "POD_NAMESPACE",
ValueFrom: &api.EnvVarSource{
FieldRef: &api.ObjectFieldSelector{
APIVersion: "v1beta3",
APIVersion: "v1",
FieldPath: "metadata.namespace",
},
},

View File

@ -208,7 +208,7 @@ func testMonitoringUsingHeapsterInfluxdb(c *client.Client) {
if !ok {
Failf("failed to get master http client")
}
proxyUrl := fmt.Sprintf("%s/api/v1beta3/proxy/namespaces/default/services/%s:api/", getMasterHost(), influxdbService)
proxyUrl := fmt.Sprintf("%s/api/v1/proxy/namespaces/default/services/%s:api/", getMasterHost(), influxdbService)
config := &influxdb.ClientConfig{
Host: proxyUrl,
// TODO(vishh): Infer username and pw from the Pod spec.

View File

@ -501,7 +501,7 @@ func validateController(c *client.Client, containerImage string, replicas int, c
By(fmt.Sprintf("waiting for all containers in %s pods to come up.", testname)) //testname should be selector
for start := time.Now(); time.Since(start) < podStartTimeout; time.Sleep(5 * time.Second) {
getPodsOutput := runKubectl("get", "pods", "-o", "template", getPodsTemplate, "--api-version=v1beta3", "-l", testname, fmt.Sprintf("--namespace=%v", ns))
getPodsOutput := runKubectl("get", "pods", "-o", "template", getPodsTemplate, "--api-version=v1", "-l", testname, fmt.Sprintf("--namespace=%v", ns))
pods := strings.Fields(getPodsOutput)
if numPods := len(pods); numPods != replicas {
By(fmt.Sprintf("Replicas for %s: expected=%d actual=%d", testname, replicas, numPods))
@ -509,13 +509,13 @@ func validateController(c *client.Client, containerImage string, replicas int, c
}
var runningPods []string
for _, podID := range pods {
running := runKubectl("get", "pods", podID, "-o", "template", getContainerStateTemplate, "--api-version=v1beta3", fmt.Sprintf("--namespace=%v", ns))
running := runKubectl("get", "pods", podID, "-o", "template", getContainerStateTemplate, "--api-version=v1", fmt.Sprintf("--namespace=%v", ns))
if running != "true" {
Logf("%s is created but not running", podID)
continue
}
currentImage := runKubectl("get", "pods", podID, "-o", "template", getImageTemplate, "--api-version=v1beta3", fmt.Sprintf("--namespace=%v", ns))
currentImage := runKubectl("get", "pods", podID, "-o", "template", getImageTemplate, "--api-version=v1", fmt.Sprintf("--namespace=%v", ns))
if currentImage != containerImage {
Logf("%s is created but running wrong image; expected: %s, actual: %s", podID, containerImage, currentImage)
continue

View File

@ -79,7 +79,7 @@ func startVolumeServer(client *client.Client, config VolumeTestConfig) *api.Pod
serverPod := &api.Pod{
TypeMeta: api.TypeMeta{
Kind: "Pod",
APIVersion: "v1beta3",
APIVersion: "v1",
},
ObjectMeta: api.ObjectMeta{
Name: config.prefix + "-server",
@ -137,7 +137,7 @@ func testVolumeClient(client *client.Client, config VolumeTestConfig, volume api
clientPod := &api.Pod{
TypeMeta: api.TypeMeta{
Kind: "Pod",
APIVersion: "v1beta3",
APIVersion: "v1",
},
ObjectMeta: api.ObjectMeta{
Name: config.prefix + "-client",
@ -282,7 +282,7 @@ var _ = Describe("Volumes", func() {
endpoints := api.Endpoints{
TypeMeta: api.TypeMeta{
Kind: "Endpoints",
APIVersion: "v1beta3",
APIVersion: "v1",
},
ObjectMeta: api.ObjectMeta{
Name: config.prefix + "-server",